Decimal() instead of float?

Fredrik Lundh fredrik at
Sun Nov 12 02:31:04 CET 2006

Michael B. Trausch wrote:

> Is there a way to use Decimal() by default in Python instead of float?  


> For example, I have a ZIP code 
> database that can do some processing on its numbers, and the numbers are 
> stored as floating point values (exactly) but Python doesn't get them 
> right

sounds odd.  are you sure you don't mean "stored as strings containing 
decimal numbers" ?

(who uses fractional ZIP codes, btw?)


More information about the Python-list mailing list