]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Blocked revisions 70366 via svnmerge
authorEric Smith <eric@trueblade.com>
Sat, 14 Mar 2009 12:30:25 +0000 (12:30 +0000)
committerEric Smith <eric@trueblade.com>
Sat, 14 Mar 2009 12:30:25 +0000 (12:30 +0000)
commit1be44115c1e8bc8bbf4897716d975221741f6175
tree61a40182094f1fb4067a2312c9d43daf9e8f67b8
parent987f30c46054b53c6607925c5bd56a2f62ea3daf
Blocked revisions 70366 via svnmerge

................
  r70366 | eric.smith | 2009-03-14 08:29:34 -0400 (Sat, 14 Mar 2009) | 24 lines

  Merged revisions 70364 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r70364 | eric.smith | 2009-03-14 07:57:26 -0400 (Sat, 14 Mar 2009) | 17 lines

    Issue 5237, Allow auto-numbered replacement fields in str.format() strings.

    For simple uses for str.format(), this makes the typing easier. Hopfully this
    will help in the adoption of str.format().

    For example:
    'The {} is {}'.format('sky', 'blue')

    You can mix and matcth auto-numbering and named replacement fields:
    'The {} is {color}'.format('sky', color='blue')

    But you can't mix and match auto-numbering and specified numbering:
    'The {0} is {}'.format('sky', 'blue')
    ValueError: cannot switch from manual field specification to automatic field numbering

    Will port to 3.1.
  ........
................