On Mon, Oct 12, 2009 at 11:41 AM, Mark Dickinson <dickinsm at gmail.com> wrote: > [Guido] >> PS. str(x) still seems to be using %.12g -- shouldn't it be made equal >> to repr() in 3.1 or 3.2? *That* I would call a bug, an oversight. > > But str still has some value in py3k: it protects users from > accumulated rounded errors produced by arithmetic operations: [...] I know, but this is much more questionable now. Making str() and repr() different was an intentional choice when repr() would often show ugly values even if the input was pretty; but now str() just hides real differences (1.3 != 1.2 + 1.1), and the difference between str() and repr() is pretty subtle. (Show of hands for those who didn't even know there was a difference? :-). I think if we had to start from scratch with the 3.1 float repr() I would have made float's str() equal to its repr(). But this is at most a +1 feeling. -- --Guido van Rossum (home page: http://www.python.org/~guido/)
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