[Python-Dev] Re: Decimal data type issues

Aahz aahz at pythoncraft.com
Mon Apr 19 14:51:49 EDT 2004


On Mon, Apr 19, 2004, Jewett, Jim J wrote:
>
> [Kevin Jacobs]
> #-   Decimal('2.4000', precision=2, scale=1) == Decimal('2.4')
> #-   Decimal('2.4', precision=5, scale=4) == Decimal('2.4000')
> #- 
> #- Remember, these literals are frequently coming from an 
> #- external source that must be constrained to a given schema.
> 
> Facundo
>> I like it a lot, but not for Decimal.
> 
> This is another face of "what do do with float"

This has nothing to do with binary floating point.  These are strings
that map to exact numbers in Decimal; if you want to do something
different with them, it's your responsibility as a programmer.  Decimal
should provide a solid foundation, not every bell & whistle.  If you
disagree, go read Cowlishaw first.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I used to have a .sig but I found it impossible to please everyone..."  --SFJ



More information about the Python-Dev mailing list