[Python-3000] Reconsider repr(0.1) == '0.10000000000000001'
Terry Reedy
tjreedy at udel.edu
Mon Dec 10 03:29:24 CET 2007
"Georg Brandl" <g.brandl at gmx.net> wrote in message
news:fjgkvu$s7j$1 at ger.gmane.org...
| Terry Reedy schrieb:
| > It seems your real problem is that repr() rather than str() is applied
| > within collections. (I am not sure exactly why but suspect there is a
| > reason.)
|
| Consider ["1, 2, 3"].
OK, but this is only an issue with the difference between the str and repr
of *strings*. The str function of collections *could* be modified to use
str on numbers. The number of digits is irrelevance to the string
formatting issue. The new Number ABC would make this switch easier, of
course.
More information about the Python-3000
mailing list