summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-06-28 20:36:54 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-06-28 20:36:54 (GMT)
commit8dad7df2b060ce7aca1a36d912dd6e3715886806 (patch)
tree5a3767ae2406080b271845cf385bedc3edf1a873 /Doc
parent500c6ef67fa4d0209cd424997fa0478d1187897b (diff)
downloadcpython-8dad7df2b060ce7aca1a36d912dd6e3715886806.zip
cpython-8dad7df2b060ce7aca1a36d912dd6e3715886806.tar.gz
cpython-8dad7df2b060ce7aca1a36d912dd6e3715886806.tar.bz2
Corrections to decimal flying circus: round returns a Decimal;
float should have a short repr.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/decimal.rst6
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