[Python-checkins] bpo-33828: Add missing versionchanged note for string.Formatter. (GH-7668)

Xiang Zhang webhook-mailer at python.org
Tue Jun 12 21:42:47 EDT 2018


https://github.com/python/cpython/commit/b9d8ad5130e0f77be28a3dec6d468e6470835573
commit: b9d8ad5130e0f77be28a3dec6d468e6470835573
branch: master
author: Xiang Zhang <angwerzx at 126.com>
committer: GitHub <noreply at github.com>
date: 2018-06-13T09:42:44+08:00
summary:

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.

files:
M Doc/library/string.rst

diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index ee8ea857da4b..89955cfddb38 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -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::
 



More information about the Python-checkins mailing list