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 terry.reedy
Recipients Todd.Rovito, docs@python, eric.araujo, eric.smith, flox, gosella, kisielk, mark.dickinson, mrabarnett, rhettinger, terry.reedy
Date 2014-04-13.23:43:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The doc bug is that the grammar block uses 'integer' (linked to in
  arg_name          ::=  [identifier | integer]
  element_index     ::=  integer | index_string
when it should use 'decimalinteger' or even more exactly 'digit+'. The int() builtin uses the same relaxed rule when no base is given.
>>> 011
SyntaxError: invalid token
>>> int('011')
>>> '{[011]}'.format('abcdefghijlmn')

One possibity is to replace 'integer' in the grammar block with 'digit+' and perhaps leave the text alone. Another is to replace 'integer' with 'index_number', to go with 'index_string, and add the production "index_number ::= digit+". My though for the latter is that 'index_number' would connect better with 'number' as used in the text. A further option would be to actually replace 'number' in the text with 'index_number'.

PS to Todd. As much as possible, doc content changes should be separated from re-formatting. I believe the first block of your patch is purely a re-format
Date User Action Args
2014-04-13 23:43:30terry.reedysetrecipients: + terry.reedy, rhettinger, mark.dickinson, eric.smith, kisielk, eric.araujo, mrabarnett, flox, docs@python, gosella, Todd.Rovito
2014-04-13 23:43:30terry.reedysetmessageid: <>
2014-04-13 23:43:30terry.reedylinkissue7951 messages
2014-04-13 23:43:30terry.reedycreate