Browse Source

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.
pull/7677/head
Xiang Zhang 8 years ago
committed by GitHub
parent
commit
b9d8ad5130
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Doc/library/string.rst

7
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::

Loading…
Cancel
Save