This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients docs@python, mark.dickinson, r.david.murray, serhiy.storchaka, sleepycal
Date 2012-12-04.20:00:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354651229.82.0.614848177739.issue16609@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-12-04 20:00:29r.david.murraysetrecipients: + r.david.murray, mark.dickinson, docs@python, sleepycal, serhiy.storchaka
2012-12-04 20:00:29r.david.murraysetmessageid: <1354651229.82.0.614848177739.issue16609@psf.upfronthosting.co.za>
2012-12-04 20:00:29r.david.murraylinkissue16609 messages
2012-12-04 20:00:29r.david.murraycreate