[TIP] doctest and floats

Laura Creighton lac at openend.se
Tue Mar 11 06:40:03 PDT 2008

In a message of Tue, 11 Mar 2008 10:55:26 +0100, Laura Creighton writes:
>We're not using doctest around here, but it's got to have a way to
>define a global function -- is_close_enough_to which you can then
>use all over the place, no?

On further reflection -- the original poster's real problem may be
in using floats in the first place.  He may be better off using
Python decimal. http://docs.python.org/lib/module-decimal.html


More information about the testing-in-python mailing list