]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33828: Add missing versionchanged note for string.Formatter. (GH-7668)
authorXiang Zhang <angwerzx@126.com>
Wed, 13 Jun 2018 01:42:44 +0000 (09:42 +0800)
committerGitHub <noreply@github.com>
Wed, 13 Jun 2018 01:42:44 +0000 (09:42 +0800)
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.

Doc/library/string.rst

index ee8ea857da4b96e83aa228959e6aacfa114696f3..89955cfddb381a607a31e0758c3cbb26b01dcb31 100644 (file)
@@ -231,8 +231,11 @@ attribute using :func:`getattr`, while an expression of the form ``'[index]'``
 does an index lookup using :func:`__getitem__`.
 
 .. versionchanged:: 3.1
-   The positional argument specifiers can be omitted, so ``'{} {}'`` is
-   equivalent to ``'{0} {1}'``.
+   The positional argument specifiers can be omitted for :meth:`str.format`,
+   so ``'{} {}'.format(a, b)`` is equivalent to ``'{0} {1}'.format(a, b)``.
+
+.. versionchanged:: 3.4
+   The positional argument specifiers can be omitted for :class:`Formatter`.
 
 Some simple format string examples::