summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-11-24 14:36:23 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-11-24 14:36:23 (GMT)
commit53f143c02d0462d52c6d4d99c78b77ef7d7b9a8c (patch)
tree5541f9c291e6b98859263dd5708c429028780e03 /Doc
parent46d15676c3782e2d000f1caeeab7811b844daf26 (diff)
downloadcpython-53f143c02d0462d52c6d4d99c78b77ef7d7b9a8c.zip
cpython-53f143c02d0462d52c6d4d99c78b77ef7d7b9a8c.tar.gz
cpython-53f143c02d0462d52c6d4d99c78b77ef7d7b9a8c.tar.bz2
Merged revisions 76491 via svnmerge from
svn+ssh://pythondev@www.python.org/python/branches/py3k ................ r76491 | mark.dickinson | 2009-11-24 14:33:29 +0000 (Tue, 24 Nov 2009) | 9 lines Merged revisions 76489 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76489 | mark.dickinson | 2009-11-24 14:27:02 +0000 (Tue, 24 Nov 2009) | 1 line Fix some documentation examples involving the repr of a float. ........ ................
Diffstat (limited to 'Doc')
-rw-r--r--Doc/faq/design.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
index 94afaff..c5af2fd 100644
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -75,9 +75,9 @@ necessary to make ``eval(repr(f)) == f`` true for any float f. The ``str()``
function prints fewer digits and this often results in the more sensible number
that was probably intended::
- >>> 0.2
- 0.20000000000000001
- >>> print 0.2
+ >>> 1.1 - 0.9
+ 0.20000000000000007
+ >>> print(1.1 - 0.9)
0.2
One of the consequences of this is that it is error-prone to compare the result