Kaydet (Commit) a1a4bdb3 authored tarafından Georg Brandl's avatar Georg Brandl

#6505: fix typos.

üst b4d0ef91
...@@ -148,9 +148,9 @@ Positional and keyword arguments can be arbitrarily combined:: ...@@ -148,9 +148,9 @@ Positional and keyword arguments can be arbitrarily combined::
... other='Georg') ... other='Georg')
The story of Bill, Manfred, and Georg. The story of Bill, Manfred, and Georg.
An optional ``':'`` and format specifier can follow the field name. This also An optional ``':'`` and format specifier can follow the field name. This allows
greater control over how the value is formatted. The following example greater control over how the value is formatted. The following example
truncates the Pi to three places after the decimal. truncates Pi to three places after the decimal.
>>> import math >>> import math
>>> print 'The value of PI is approximately {0:.3f}.'.format(math.pi) >>> print 'The value of PI is approximately {0:.3f}.'.format(math.pi)
...@@ -204,8 +204,8 @@ operation. For example:: ...@@ -204,8 +204,8 @@ operation. For example::
The value of PI is approximately 3.142. The value of PI is approximately 3.142.
Since :meth:`str.format` is quite new, a lot of Python code still uses the ``%`` 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 removed operator. However, because this old style of formatting will eventually be
from the language :meth:`str.format` should generally be used. removed from the language, :meth:`str.format` should generally be used.
More information can be found in the :ref:`string-formatting` section. More information can be found in the :ref:`string-formatting` section.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment