Message79579
Raymond, Mark, thanks for this work!
I'd include the following in the PEP (under the "from float"
discussion), what do you think?
"""
Update: The .from_float() method was added to Python 2.7 and 3.1
versions, providing lossless and exact conversion from float to Decimal
(see issue 4796 [7]_ for further information).
It has the following syntax::
Decimal.from_float(floatNumber)
where ``floatNumber`` is the float number origin of the construction.
Example::
>>> Decimal.from_float(1.1)
Decimal('1.100000000000000088817841970012523233890533447265625')
""" |
|
Date |
User |
Action |
Args |
2009-01-10 21:43:12 | facundobatista | set | recipients:
+ facundobatista, rhettinger, mark.dickinson, steven.daprano |
2009-01-10 21:43:11 | facundobatista | set | messageid: <1231623791.77.0.0575493527582.issue4796@psf.upfronthosting.co.za> |
2009-01-10 21:43:10 | facundobatista | link | issue4796 messages |
2009-01-10 21:43:09 | facundobatista | create | |
|