"Dinu Gherman" <dinu at reportlab.com> wrote in message news:3ae6eb73.802364759 at news.vr.in-berlin.de... > 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. Now, repr(x) "tells the truth"; use str(x) to get prettier (false:-) output. The interpreter uses repr. You can change that in Python 2.1, by setting sys.displayhook to your favourite "display this result to sys.stdout" function, but that was not in 2.0 yet. Alex
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