summaryrefslogtreecommitdiff
path: root/Doc/tutorial/floatingpoint.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 +0000
committerBenjamin Peterson <benjamin@python.org>2008-05-26 00:54:22 +0000
commitf9ef9881d778fc5a5889ac36d77b204eab4d7b4e (patch)
tree112e7bde302cf1b3eb7ff057d201d88e5a67f8b0 /Doc/tutorial/floatingpoint.rst
parentc15205e93957b3bef18f317a480f8b99213d4870 (diff)
downloadcpython-git-f9ef9881d778fc5a5889ac36d77b204eab4d7b4e.tar.gz
update the tutorial to use str.format
Diffstat (limited to 'Doc/tutorial/floatingpoint.rst')
-rw-r--r--Doc/tutorial/floatingpoint.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/tutorial/floatingpoint.rst b/Doc/tutorial/floatingpoint.rst
index cbf7008ec1..6913c46b79 100644
--- a/Doc/tutorial/floatingpoint.rst
+++ b/Doc/tutorial/floatingpoint.rst
@@ -132,9 +132,8 @@ that every float operation can suffer a new rounding error.
While pathological cases do exist, for most casual use of floating-point
arithmetic you'll see the result you expect in the end if you simply round the
display of your final results to the number of decimal digits you expect.
-:func:`str` usually suffices, and for finer control see the discussion of
-Python's ``%`` format operator: the ``%g``, ``%f`` and ``%e`` format codes
-supply flexible and easy ways to round float results for display.
+:func:`str` usually suffices, and for finer control see the :meth:`str.format`
+method's format specifiers in :ref:`formatstrings`.
.. _tut-fp-error: