diff options
author | Georg Brandl <georg@python.org> | 2009-01-03 21:18:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-01-03 21:18:54 (GMT) |
commit | 48310cd3f2e02ced9ae836ccbcb67e9af3097d62 (patch) | |
tree | 04c86b387c11bfd4835a320e76bbb2ee24626e0d /Doc/tutorial/stdlib2.rst | |
parent | 3d3558a4653fcfcbdcbb75bda5d61e93c48f4d51 (diff) | |
download | cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.zip cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.tar.gz cpython-48310cd3f2e02ced9ae836ccbcb67e9af3097d62.tar.bz2 |
Remove trailing whitespace.
Diffstat (limited to 'Doc/tutorial/stdlib2.rst')
-rw-r--r-- | Doc/tutorial/stdlib2.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst index a06a20b..f581972 100644 --- a/Doc/tutorial/stdlib2.rst +++ b/Doc/tutorial/stdlib2.rst @@ -174,7 +174,7 @@ tasks in background while the main program continues to run:: class AsyncZip(threading.Thread): def __init__(self, infile, outfile): - threading.Thread.__init__(self) + threading.Thread.__init__(self) self.infile = infile self.outfile = outfile def run(self): @@ -358,11 +358,11 @@ For example, calculating a 5% tax on a 70 cent phone charge gives different results in decimal floating point and binary floating point. The difference 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.7350") >>> .70 * 1.05 - 0.73499999999999999 + 0.73499999999999999 The :class:`Decimal` result keeps a trailing zero, automatically inferring four place significance from multiplicands with two place significance. Decimal @@ -380,7 +380,7 @@ calculations and equality tests that are unsuitable for binary floating point:: >>> sum([Decimal('0.1')]*10) == Decimal('1.0') True >>> sum([0.1]*10) == 1.0 - False + False The :mod:`decimal` module provides arithmetic with as much precision as needed:: |