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 eddy
Recipients eddy, georg.brandl
Date 2010-02-14.11:28:05
SpamBayes Score 0.0036298381
Marked as misclassified No
Message-id <1266146946.63.0.7361643831.issue7928@psf.upfronthosting.co.za>
In-reply-to
Content
http://docs.python.org/library/string.html#formatstrings
field_name        ::=  (identifier | integer) ("." attribute_name | "[" element_index "]")*
element_index     ::= integer

Subsequent text indicates __getitem__() is used but does not overtly say that a string can be used; but
http://docs.python.org/whatsnew/2.6.html#pep-3101-advanced-string-formatting
gives the example
>>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)
and clearly '.mp4' is passed to __getitem__(); a string, not an integer.

Clearly one of these is wrong !
Given that the "what's new" doc goes into some detail about how the content of [...] gets parsed, I'm guessing it's right and the grammar is wrong.
History
Date User Action Args
2010-02-14 11:29:06eddysetrecipients: + eddy, georg.brandl
2010-02-14 11:29:06eddysetmessageid: <1266146946.63.0.7361643831.issue7928@psf.upfronthosting.co.za>
2010-02-14 11:28:06eddylinkissue7928 messages
2010-02-14 11:28:05eddycreate