Skip to content

Commit

Permalink
bpo-33828: Add missing versionchanged note for string.Formatter. (GH-…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
zhangyangyu committed Jun 13, 2018
1 parent eeb99bd commit b9d8ad5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Doc/library/string.rst
Expand Up @@ -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::

Expand Down

0 comments on commit b9d8ad5

Please sign in to comment.