Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53f143c

Browse files
committed
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://[email protected]/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. ........ ................
1 parent 46d1567 commit 53f143c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/faq/design.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ necessary to make ``eval(repr(f)) == f`` true for any float f. The ``str()``
7575
function prints fewer digits and this often results in the more sensible number
7676
that was probably intended::
7777

78-
>>> 0.2
79-
0.20000000000000001
80-
>>> print 0.2
78+
>>> 1.1 - 0.9
79+
0.20000000000000007
80+
>>> print(1.1 - 0.9)
8181
0.2
8282

8383
One of the consequences of this is that it is error-prone to compare the result

0 commit comments

Comments
 (0)