Issue #14123: Explicitly mention that old style % string formatting has caveats but is not going away any time soon.
This commit is contained in:
commit
c45a8a153b
|
@ -1466,8 +1466,13 @@ Old String Formatting Operations
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The formatting operations described here are obsolete and may go away in future
|
The formatting operations described here are modelled on C's printf()
|
||||||
versions of Python. Use the new :ref:`string-formatting` in new code.
|
syntax. They only support formatting of certain builtin types. The
|
||||||
|
use of a binary operator means that care may be needed in order to
|
||||||
|
format tuples and dictionaries correctly. As the new
|
||||||
|
:ref:`string-formatting` syntax is more flexible and handles tuples and
|
||||||
|
dictionaries naturally, it is recommended for new code. However, there
|
||||||
|
are no current plans to deprecate printf-style formatting.
|
||||||
|
|
||||||
String objects have one unique built-in operation: the ``%`` operator (modulo).
|
String objects have one unique built-in operation: the ``%`` operator (modulo).
|
||||||
This is also known as the string *formatting* or *interpolation* operator.
|
This is also known as the string *formatting* or *interpolation* operator.
|
||||||
|
|
Loading…
Reference in New Issue