summaryrefslogtreecommitdiffstats
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2018-06-13 01:42:44 (GMT)
committerGitHub <noreply@github.com>2018-06-13 01:42:44 (GMT)
commitb9d8ad5130e0f77be28a3dec6d468e6470835573 (patch)
tree5ec16beadd5f4b7de06ce64d517fbb25d45c45f9 /Doc/library/string.rst
parenteeb99bdd0333dd37354a5b71a5c40fe8e027c432 (diff)
downloadcpython-b9d8ad5130e0f77be28a3dec6d468e6470835573.zip
cpython-b9d8ad5130e0f77be28a3dec6d468e6470835573.tar.gz
cpython-b9d8ad5130e0f77be28a3dec6d468e6470835573.tar.bz2
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.
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r--Doc/library/string.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index ee8ea85..89955cf 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::