[Python-checkins] r70367 - python/branches/release30-maint
eric.smith
python-checkins at python.org
Sat Mar 14 13:30:26 CET 2009
Author: eric.smith
Date: Sat Mar 14 13:30:25 2009
New Revision: 70367
Log:
Blocked revisions 70366 via svnmerge
................
r70366 | eric.smith | 2009年03月14日 08:29:34 -0400 (2009年3月14日) | 24 lines
Merged revisions 70364 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70364 | eric.smith | 2009年03月14日 07:57:26 -0400 (2009年3月14日) | 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.
........
................
Modified:
python/branches/release30-maint/ (props changed)
More information about the Python-checkins
mailing list