control precision for str(obj) output?
Dan Bishop
danb_83 at yahoo.com
Wed May 4 01:56:15 EDT 2005
Andrew Dalke wrote:
> Mike Meyer wrote:
> > Someone want to tell me the procedure for submitting FAQ entries,
so I
> > can do that for this?
>
> You mean more than what already exists at
>
http://www.python.org/doc/faq/general.html#why-are-floating-point-calculations-so-inaccurate
>
> which has a link to an even more detailed chapter in the tutorial at
> http://docs.python.org/tut/node16.html
Yes. Those pages explain why repr(0.2) != '0.2', but they don't
explain why str([x]) != '[%s]' % x .
More information about the Python-list
mailing list