diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-06-28 20:38:24 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-06-28 20:38:24 (GMT) |
commit | cf2d9ff3c5f84eb0481165167b1c523d568ecf7b (patch) | |
tree | 816d1d32896ab918e2ccd32d544367e262d7bc5f | |
parent | d76c8da09822349d5a92a04aa97966e777ba2657 (diff) | |
download | cpython-cf2d9ff3c5f84eb0481165167b1c523d568ecf7b.zip cpython-cf2d9ff3c5f84eb0481165167b1c523d568ecf7b.tar.gz cpython-cf2d9ff3c5f84eb0481165167b1c523d568ecf7b.tar.bz2 |
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.
........
-rw-r--r-- | Doc/library/decimal.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index d548c0d..4eba768 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -187,9 +187,9 @@ floating point flying circus: >>> str(a) '1.34' >>> float(a) - 1.3400000000000001 - >>> round(a, 1) # round() first converts to binary floating point - 1.3 + 1.34 + >>> round(a, 1) + Decimal('1.3') >>> int(a) 1 >>> a * 5 |