Numbers in python

neildunn at gmail.com neildunn at gmail.com
Fri Mar 10 10:40:13 EST 2006


If your still worried by using floats for your values you may wish to
look into the decimal module:

http://docs.python.org/lib/module-decimal.html

Example:

>>> from decimal import Decimal
>>> Decimal(2) + Decimal('1.47')
Decimal("3.47")


Regards,
Neil




More information about the Python-list mailing list