On Sun, 28 Dec 2008 06:58:18 +0000, Steven D'Aprano wrote:

> def make_decimal(f, precision=16):
>     # choose how many decimal places you want to keep return
>     Decimal.from_float(f, precision)

Ah crap, I forgot that from_float() has been left out of the decimal API. 
That's very annoying.

Sorry about that.


-- 
Steven
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to