3 Mar
2014
3 Mar
'14
5:24 p.m.
Mark H. Harris, 03.03.2014 18:10:
We have a very speedy decimal module, its 2014, and we just don't need any more of this:
from decimal import * Decimal(.1) Decimal('0.1000000000000000055511151231257827021181583404541015625')
I assume you are aware that the correct way to do this is
Decimal('0.1') Decimal('0.1')
i.e., if you want exact precision, use exact literals. That being said, did you read through the previous discussions where people suggested to add decimal literals to Python? Stefan