mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Fixes #543. % is not depricated in PEP3101.
This commit is contained in:
@@ -469,9 +469,8 @@ like above or in cases where you are adding to an existing string, using
|
|||||||
.. note::
|
.. note::
|
||||||
You can also use the :ref:`% <python:string-formatting>` formatting operator
|
You can also use the :ref:`% <python:string-formatting>` formatting operator
|
||||||
to concatenate a pre-determined number of strings besides :py:meth:`str.join`
|
to concatenate a pre-determined number of strings besides :py:meth:`str.join`
|
||||||
and ``+``. However, according to :pep:`3101`, the ``%`` operator became
|
and ``+``. However, :pep:`3101`, discourages the usage of the ``%`` operator
|
||||||
deprecated in Python 3.1 and will be replaced by the :py:meth:`str.format`
|
in favor of the :py:meth:`str.format` method.
|
||||||
method in the later versions.
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user