[Python-checkins] r73633 - in python/branches/release31-maint: Doc/library/decimal.rst
mark.dickinson
python-checkins at python.org
Sun Jun 28 22:38:24 CEST 2009
Author: mark.dickinson
Date: Sun Jun 28 22:38:24 2009
New Revision: 73633
Log:
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.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Doc/library/decimal.rst
Modified: python/branches/release31-maint/Doc/library/decimal.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/decimal.rst (original)
+++ python/branches/release31-maint/Doc/library/decimal.rst Sun Jun 28 22:38:24 2009
@@ -187,9 +187,9 @@
>>> 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
More information about the Python-checkins
mailing list