a print bug?
Summercoolness at gmail.com
Summercoolness at gmail.com
Wed Jul 26 21:19:39 EDT 2006
Sybren Stuvel wrote:
> It has nothing to do with the print command, and everything with
> floating point precision. See http://docs.python.org/tut/node16.html
how about the discrepancy between
>>> print 1.2345
1.2345
>>> print "%10.3f" % 1.2345 # seems like a bug
1.234
the first one, print knows enough to recognize and print it as 1.2345.
however, in the second line, when it is round off, it doesn't know it
is 1.2345 any more.
More information about the Python-list
mailing list