diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-06-13 02:11:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 02:11:25 (GMT) |
commit | 439a9b69985bd4757de1504d19b040f78e384ca4 (patch) | |
tree | 8681bb552d6684d81a1750c5750bebe81a9159f3 | |
parent | 63dd1f70c1aa57494802c9b68f9db4918620fc8f (diff) | |
download | cpython-439a9b69985bd4757de1504d19b040f78e384ca4.zip cpython-439a9b69985bd4757de1504d19b040f78e384ca4.tar.gz cpython-439a9b69985bd4757de1504d19b040f78e384ca4.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.
(cherry picked from commit b9d8ad5130e0f77be28a3dec6d468e6470835573)
Co-authored-by: Xiang Zhang <angwerzx@126.com>
-rw-r--r-- | Doc/library/string.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 706d5e1..f4c4b8c 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:: |