floating point glitch
Michael Hoffman
m.h.3.9.1.without.dots.at.cam.ac.uk at example.com
Tue Sep 28 09:55:07 EDT 2004
Tim Roberts wrote:
> Right! That's the point. str() is the perfect solution in those cases
> where you want the language to lie to you. In many cases, that IS what you
> want. repr() is the perfect solution when you need an invertible function.
repr() does not provide an invertible function if you are using it on a
list, as was pointed out here, since list.__repr__() essentially calls
str() for its float members rather than repr().
--
Michael Hoffman
More information about the Python-list
mailing list