Commit 11c4941b authored by Mark Dickinson's avatar Mark Dickinson

More Decimal quote fixing; backport of r73642

parent e007860b
...@@ -360,7 +360,7 @@ becomes significant if the results are rounded to the nearest cent:: ...@@ -360,7 +360,7 @@ becomes significant if the results are rounded to the nearest cent::
>>> from decimal import * >>> from decimal import *
>>> Decimal('0.70') * Decimal('1.05') >>> Decimal('0.70') * Decimal('1.05')
Decimal("0.7350") Decimal('0.7350')
>>> .70 * 1.05 >>> .70 * 1.05
0.73499999999999999 0.73499999999999999
...@@ -373,7 +373,7 @@ Exact representation enables the :class:`Decimal` class to perform modulo ...@@ -373,7 +373,7 @@ Exact representation enables the :class:`Decimal` class to perform modulo
calculations and equality tests that are unsuitable for binary floating point:: calculations and equality tests that are unsuitable for binary floating point::
>>> Decimal('1.00') % Decimal('.10') >>> Decimal('1.00') % Decimal('.10')
Decimal("0.00") Decimal('0.00')
>>> 1.00 % 0.10 >>> 1.00 % 0.10
0.09999999999999995 0.09999999999999995
...@@ -386,6 +386,6 @@ The :mod:`decimal` module provides arithmetic with as much precision as needed:: ...@@ -386,6 +386,6 @@ The :mod:`decimal` module provides arithmetic with as much precision as needed::
>>> getcontext().prec = 36 >>> getcontext().prec = 36
>>> Decimal(1) / Decimal(7) >>> Decimal(1) / Decimal(7)
Decimal("0.142857142857142857142857142857142857") Decimal('0.142857142857142857142857142857142857')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment