Decimal printing without the exponent
belred1 at yahoo.com
Sun Nov 28 18:36:59 CET 2004
is there a way to make the Decimal class not print the exponent version of the
>>> str(Decimal((0, (1, 0, 1), 1)))
how do you make the 2nd example print 1010?
i know i can do this, but i thought i could make the Decimal class convert the
>>> '%d' % Decimal((0, (1, 0, 1), 1))
i tried the to_eng_string() and to_sci_string() but that didn't work. does
anyone know how to do this?
More information about the Python-list