[issue12580] Documentation error in Decimal module

Raymond Hettinger report at bugs.python.org
Sun Jul 17 21:07:50 CEST 2011


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

The example is correct and runs as expected:

>>> Decimal(3.14)
Decimal('3.140000000000000124344978758017532527446746826171875')

Per the Whatsnew3.2 document:
'''
The decimal.Decimal constructor now accepts float objects directly so there in no longer a need to use the from_float() method (issue 8257).
'''

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12580>
_______________________________________


More information about the Python-bugs-list mailing list