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.
........
This commit is contained in:
Mark Dickinson 2009-11-24 14:33:29 +00:00
parent f4ae35fa01
commit a63b30671d
1 changed files with 3 additions and 3 deletions

View File

@ -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