[issue7928] String formatting: grammar wrongly limits [index] to integer
Eric Smith
report at bugs.python.org
Mon Feb 22 14:31:40 CET 2010
Eric Smith <eric at trueblade.com> 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 the best way to express that? Maybe taking a clue from string literals, this would be:
element_index: `integer` | index_string
index_string: <any source character except "]"> +
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7928>
_______________________________________
More information about the Python-bugs-list
mailing list