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

Skip to content

Commit cf2d9ff

Browse files
committed
Merged revisions 73632 via svnmerge from
svn+ssh://pythondev@www.python.org/python/branches/py3k ........ r73632 | mark.dickinson | 2009-06-28 21:36:54 +0100 (Sun, 28 Jun 2009) | 3 lines Corrections to decimal flying circus: round returns a Decimal; float should have a short repr. ........
1 parent d76c8da commit cf2d9ff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/decimal.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ floating point flying circus:
187187
>>> str(a)
188188
'1.34'
189189
>>> float(a)
190-
1.3400000000000001
191-
>>> round(a, 1) # round() first converts to binary floating point
192-
1.3
190+
1.34
191+
>>> round(a, 1)
192+
Decimal('1.3')
193193
>>> int(a)
194194
1
195195
>>> a * 5

0 commit comments

Comments
 (0)