New submission from Jan Kaliszewski <z...@chopin.edu.pl>: 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)]. ---------- assignee: georg.brandl components: Documentation messages: 90946 nosy: georg.brandl, zuo severity: normal status: open title: No update about automatic numbering of fields in format strings (e.g. 'A {} with {} buttocks') versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6579> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com