[Python-ideas] Python3.3 Decimal Library Released

Stefan Behnel stefan_ml at behnel.de
Mon Mar 3 18:24:48 CET 2014


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




More information about the Python-ideas mailing list