From: Mark Dickinson Date: Sun, 28 Jun 2009 20:36:54 +0000 (+0000) Subject: Corrections to decimal flying circus: round returns a Decimal; X-Git-Tag: v3.2a1~2964 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8dad7df2b060ce7aca1a36d912dd6e3715886806;p=python Corrections to decimal flying circus: round returns a Decimal; float should have a short repr. --- diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index d548c0d1e1..4eba76872a 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