Skip to content

Commit 29fdea5

Browse files
bpo-33828: Add missing versionchanged note for string.Formatter. (GH-7668)
string.Formatter auto-numbering feature was added in 3.4 and there is no versionchanged note in its documentation, making the documentation ambiguous about which version the feature is available. (cherry picked from commit b9d8ad5) Co-authored-by: Xiang Zhang <[email protected]>
1 parent 7b82281 commit 29fdea5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/string.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,11 @@ attribute using :func:`getattr`, while an expression of the form ``'[index]'``
231231
does an index lookup using :func:`__getitem__`.
232232

233233
.. versionchanged:: 3.1
234-
The positional argument specifiers can be omitted, so ``'{} {}'`` is
235-
equivalent to ``'{0} {1}'``.
234+
The positional argument specifiers can be omitted for :meth:`str.format`,
235+
so ``'{} {}'.format(a, b)`` is equivalent to ``'{0} {1}'.format(a, b)``.
236+
237+
.. versionchanged:: 3.4
238+
The positional argument specifiers can be omitted for :class:`Formatter`.
236239

237240
Some simple format string examples::
238241

0 commit comments

Comments
 (0)