[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-25 Thread Eric Smith
Eric Smith added the comment: Checked in. trunk: r78444 release26-maint: r78445 py3k: r78446 release31-maint: r78447 -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
Eric Smith added the comment: Proposed patch attached. The rest of the documentation in the following 2 paragraphs looks correct. It refers to __getitem__, which is how either strings or integers is looked up. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-22 Thread Eric Smith
Eric Smith added the comment: I'm not exactly sure what wording to use here. element_index: `integer` | `identifier` is not exactly correct, because it can be a non-identifier (as the example that eddy quotes points out. It's really "any sequence of characters except ']'". Any ideas on

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-14 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-14 Thread Edward Welbourne
New submission from Edward Welbourne : 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