Message140531
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. |
|
Date |
User |
Action |
Args |
2011-07-17 18:30:02 | holdenweb | set | recipients:
+ holdenweb, georg.brandl |
2011-07-17 18:30:02 | holdenweb | set | messageid: <1310927402.36.0.418806971374.issue12580@psf.upfronthosting.co.za> |
2011-07-17 18:30:01 | holdenweb | link | issue12580 messages |
2011-07-17 18:30:01 | holdenweb | create | |
|