This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author holdenweb
Recipients georg.brandl, holdenweb
Date 2011-07-17.18:30:01
SpamBayes Score 0.00044652823
Marked as misclassified No
Message-id <1310927402.36.0.418806971374.issue12580@psf.upfronthosting.co.za>
In-reply-to
Content
We see in the "Quick-Start Tutorial" (py3k section 8.4.1) the following example:

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

In actua; fact one would expect an exception from that code, which should perhaps instead read

>>> Decimal.from_float(3.14)
Decimal('3.140000000000000124344978758017532527446746826171875')

This class method is the recommended way to convert floats to decimal when necessary.
History
Date User Action Args
2011-07-17 18:30:02holdenwebsetrecipients: + holdenweb, georg.brandl
2011-07-17 18:30:02holdenwebsetmessageid: <1310927402.36.0.418806971374.issue12580@psf.upfronthosting.co.za>
2011-07-17 18:30:01holdenweblinkissue12580 messages
2011-07-17 18:30:01holdenwebcreate