mirror of
https://github.com/python/cpython.git
synced 2025-01-06 00:25:19 +08:00
merge
This commit is contained in:
commit
8f34da3f5f
@ -213,10 +213,6 @@ operation. For example::
|
||||
>>> print('The value of PI is approximately %5.3f.' % math.pi)
|
||||
The value of PI is approximately 3.142.
|
||||
|
||||
Since :meth:`str.format` is quite new, a lot of Python code still uses the ``%``
|
||||
operator. However, because this old style of formatting will eventually be
|
||||
removed from the language, :meth:`str.format` should generally be used.
|
||||
|
||||
More information can be found in the :ref:`old-string-formatting` section.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user