Skip to content

Commit fc8ea20

Browse files
authored
[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.
1 parent 42ca836 commit fc8ea20

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/string.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@ attribute using :func:`getattr`, while an expression of the form ``'[index]'``
257257
does an index lookup using :func:`__getitem__`.
258258

259259
.. versionchanged:: 2.7
260-
The positional argument specifiers can be omitted, so ``'{} {}'`` is
261-
equivalent to ``'{0} {1}'``.
260+
The positional argument specifiers can be omitted for :meth:`str.format` and
261+
:meth:`unicode.format`, so ``'{} {}'`` is equivalent to ``'{0} {1}'``,
262+
``u'{} {}'`` is equivalent to ``u'{0} {1}'``.
262263

263264
Some simple format string examples::
264265

0 commit comments

Comments
 (0)