summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/floatingpoint.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-26 01:03:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-26 01:03:56 (GMT)
commite6f00637be87c8f5f0e50bf317d684ea421a6d19 (patch)
tree72af08d6c7d328792bce581755aa38c24969b6bd /Doc/tutorial/floatingpoint.rst
parentdc6c16ac634eef50ba819adea2eed74651530197 (diff)
downloadcpython-e6f00637be87c8f5f0e50bf317d684ea421a6d19.zip
cpython-e6f00637be87c8f5f0e50bf317d684ea421a6d19.tar.gz
cpython-e6f00637be87c8f5f0e50bf317d684ea421a6d19.tar.bz2
Merged revisions 63655 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r63655 | benjamin.peterson | 2008-05-25 19:54:22 -0500 (Sun, 25 May 2008) | 2 lines 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 2eaab12..150e8fb 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`.
If you are a heavy user of floating point operations you should take a look
at the Numerical Python package and many other packages for mathematical and