summaryrefslogtreecommitdiffstats
path: root/Doc/faq
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-11-24 14:27:02 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-11-24 14:27:02 (GMT)
commit6b87f117caba3a6af28f0d0afb05515ae8997620 (patch)
tree73b2396c2562f2c64355df5cad7a3771b5360bd8 /Doc/faq
parent9a03f2fd03278d2c12dfe253de1bbed7c0c9c506 (diff)
downloadcpython-6b87f117caba3a6af28f0d0afb05515ae8997620.zip
cpython-6b87f117caba3a6af28f0d0afb05515ae8997620.tar.gz
cpython-6b87f117caba3a6af28f0d0afb05515ae8997620.tar.bz2
Fix some documentation examples involving the repr of a float.
Diffstat (limited to 'Doc/faq')
-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..02e3fad 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