[Tutor] Need a better name for this function

Richard D. Moores rdmoores at gmail.com
Tue Dec 15 22:46:37 CET 2009

def float_to_exact_number_stored_in_computer(f):
   Given a float, return the exact number stored in computer.

   from decimal import Decimal
   return Decimal.from_float(f)

I've just borrowed from the doc, but that name is too long, isn't it? Please
suggest something shorter but still meaningful.


Dick Moores
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091215/0d658f8b/attachment.htm>

More information about the Tutor mailing list