[Python-checkins] [2.7] bpo-33828: Clarify auto-numbering is not available to string.Formatter. (GH-7668) (GH-7676)

Xiang Zhang webhook-mailer at python.org
Tue Jun 12 22:38:05 EDT 2018


https://github.com/python/cpython/commit/fc8ea20c6f8571de96791bc5f7f2d693406024c7
commit: fc8ea20c6f8571de96791bc5f7f2d693406024c7
branch: 2.7
author: Xiang Zhang <angwerzx at 126.com>
committer: GitHub <noreply at github.com>
date: 2018-06-13T10:37:54+08:00
summary:

[2.7] bpo-33828: Clarify auto-numbering is not available to string.Formatter. (GH-7668) (GH-7676)

string.Formatter auto-numbering feature was added in 3.4 and not
available in 2.7. Make the documentation unambiguous.

files:
M Doc/library/string.rst

diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index c2af446619e3..2293b022c26a 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -257,8 +257,9 @@ attribute using :func:`getattr`, while an expression of the form ``'[index]'``
 does an index lookup using :func:`__getitem__`.
 
 .. versionchanged:: 2.7
-   The positional argument specifiers can be omitted, so ``'{} {}'`` is
-   equivalent to ``'{0} {1}'``.
+   The positional argument specifiers can be omitted for :meth:`str.format` and
+   :meth:`unicode.format`, so ``'{} {}'`` is equivalent to ``'{0} {1}'``,
+   ``u'{} {}'`` is equivalent to ``u'{0} {1}'``.
 
 Some simple format string examples::
 



More information about the Python-checkins mailing list