R. David Murray added the comment:

In fact it has been changed.  In Python3 you get:

>>> x = 0.88022393777095409
>>> x
0.8802239377709541
>>> str(x)
'0.8802239377709541'

Even in 2.7 you would get the above repr, not the one you showed.  This is 
because 2.7 and 3.3 use the "shortest repr" described in the floating point 
document, but 2.7 still uses the old rounding as the default str representation 
(for backward compatibility reasons).

While you could still make an argument for updating the 2.7 docs, I'm not sure 
it is worth it.  If you (or anyone) want to propose a patch, I would suggest 
that instead of adding a note to the random docs, that a glossary entry be 
added for 'floating point' which mentions it as a 2.7 limitation, and a link to 
that glossary entry from the random docs.

----------
assignee:  -> docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python, r.david.murray
priority: normal -> low
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16609>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to