[issue5237] Allow auto-numbered replacement fields in str.format() strings

Terry J. Reedy report at bugs.python.org
Fri Feb 13 17:37:12 CET 2009


Terry J. Reedy <tjreedy at udel.edu> added the comment:

All I am requesting is that
'{} {} {}'.format(3, 'pi', 3.14) work as

>>> '%s %s %s' % (3, 'pi', 3.14)
'3 pi 3.14'
>>> '{0} {1} {2}'.format(3, 'pi', 3.14)
'3 pi 3.14'

do today (3.0).

I should note that the difference between typing {}, which is easy, and
{1}, is more than just one keystroke because the latter requires
unshift-1-shift

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5237>
_______________________________________


More information about the Python-bugs-list mailing list