This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zuo
Recipients georg.brandl, zuo
Date 2009-07-26.14:11:07
SpamBayes Score 1.3532784e-06
Marked as misclassified No
Message-id <1248617469.33.0.437131453768.issue6579@psf.upfronthosting.co.za>
In-reply-to
Content
As we can read in http://docs.python.org/3.1/whatsnew/3.1.html#other-
language-changes:

----
The fields in format() strings can now be automatically numbered:
>>> 'Sir {} of {}'.format('Gallahad', 'Camelot')
'Sir Gallahad of Camelot'

Formerly, the string would have required numbered fields such as: 'Sir 
{0} of {1}'.

(Contributed by Eric Smith; issue 5237.)
----

But it is not mentioned in 3.2's, 3.1's and 2.7's docs about format 
string syntax, e.g. in 3.1 docs we have:

http://docs.python.org/3.1/library/string.html#format-string-syntax

[Please note that also grammar for a replacement field should be 
updated there ('field_name' should be in '[' ']', but I'm not sure if 
it'd be enough)].
History
Date User Action Args
2009-07-26 14:11:09zuosetrecipients: + zuo, georg.brandl
2009-07-26 14:11:09zuosetmessageid: <1248617469.33.0.437131453768.issue6579@psf.upfronthosting.co.za>
2009-07-26 14:11:08zuolinkissue6579 messages
2009-07-26 14:11:07zuocreate