In article <9c6vmq02kec at news2.newsguy.com>, Alex Martelli wrote: >> Apparently the python mailiing lists on python.org are blocked, so let >> me ask here. Is there any good reason for the following behaviour to >> be different on Python 1.5.2 and 2.0? > [snip] >> >>> 3.14 >> 3.14 > [snip] >> >>> 3.14 >> 3.1400000000000001 > >Yes: repr(x) where x is a float used to HIDE some digits >(trying to provide a 'prettier' look), but that violates the >mission of repr, which is to give you as much info as it can. I presume that on typical platforms, it can't be guaranteed that float(repr(x)) == x. If you pickle a float and then un-pickle it on the same platform are you guaranted to end up with the same binary representation? -- Grant Edwards grante Yow! People humiliating at a salami! visi.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4