it seems that the behavior of "print" is that it will round off properly for any floating point imperfection, such as shown in the first two samples. The third sample seems to be a bug? It doesn't know how to handle the floating imperfection in this case.
>>> 1.2345 1.2344999999999999 >>> print 1.2345 1.2345 >>> print "%10.3f" % 1.2345 # seems like a bug >>> ---------------------------------- 1.234 >>> print "%10.3f" % 1.23450001 1.235 >>> print "%10.3f" % 1.2344 1.234 >>> print "%10.3f" % 1.2346 1.235 -- http://mail.python.org/mailman/listinfo/python-list