summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-03-14 11:59:18 +0000
committerEric Smith <eric@trueblade.com>2009-03-14 11:59:18 +0000
commit991f8a0bebd01f8b571f706c645a13dc8b713e7c (patch)
tree2b928cff28b2b4a7bee0797b38b7e318e2b9b759 /Python/compile.c
parenta099d145e6a24d7c5f46db5b657661287a089c6a (diff)
downloadcpython-git-991f8a0bebd01f8b571f706c645a13dc8b713e7c.tar.gz
Blocked revisions 70364 via svnmerge
........ r70364 | eric.smith | 2009-03-14 07:57:26 -0400 (Sat, 14 Mar 2009) | 17 lines Issue 5237, Allow auto-numbered replacement fields in str.format() strings. For simple uses for str.format(), this makes the typing easier. Hopfully this will help in the adoption of str.format(). For example: 'The {} is {}'.format('sky', 'blue') You can mix and matcth auto-numbering and named replacement fields: 'The {} is {color}'.format('sky', color='blue') But you can't mix and match auto-numbering and specified numbering: 'The {0} is {}'.format('sky', 'blue') ValueError: cannot switch from manual field specification to automatic field numbering Will port to 3.1. ........
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions