On Sep 11, 4:07 am, "[david]" <[EMAIL PROTECTED]> wrote: > returns poorly formatted values: > > >>>str(13.3) > '13.3' > >>>str([13.3]) > '[13.300000000000001]' > > [david]
There is some difference in the way repr() and str() convert floats to strings: >>> a = 13.3 >>> print str(a) 13.3 >>> print repr(a) 13.300000000000001 >>> a 13.300000000000001 >>> a.__str__() '13.3' >>> a.__repr__() '13.300000000000001' >>> -- http://mail.python.org/mailman/listinfo/python-list