Raymond Hettinger added the comment: ISTM shorter repr's are inherently misleading and will make it more harder to diagnose why 1.1 * 3 != 3.3 or why round(1.0 % 0.1, 1) == 0.1 which is *very* far-off of what you might expect.
The 17 digit representation is useful in that it suggests where the problem lies. In contrast, showing two numbers with reprs of different lengths will strongly suggest that the shorter one is exactly represented. Currently, that is a useful suggestion, 10.25 shows as 10.25 while 10.21 shows as 10.210000000000001 (indicating that the latter is not exactly represented). If you start showing 1.1 as 1.1, then you've lost both benefits. FWIW, I prefer the current 17 digit behavior, its speed, its cross-754 round-trip guarantees, and it psychological cues about exactness. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1580> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com