You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2016-01-30.10:31:52.952>created_at=<Date2016-01-30.09:22:04.073>labels= ['invalid', 'docs']
title='repr() and str() are identical for floats in 3.5'updated_at=<Date2016-01-30.22:33:57.538>user='https://bugs.python.org/andersrundgrennetgmailcom'
A test with a 100 million random and selected IEEE 64-bit values
returned no differences
The float type's tp_str and tp_repr both call float_repr in Objects/floatobject.c. See the 3.5.1 PyFloat_Type definition 1.
Perhaps you were reading something in reference to Python 2, which has separate float_str and float_repr functions. See the 2.7.11 PyFloat_Type definition 2 and the header file where PyFloat_STR_PRECISION is defined to be 12 digits 3.
Closing: as Martin pointed out, the behaviour is intentional, and without a reference to a particular part of the documentation this issue isn't useful. (Anders: if you find a part of the 3.5 documentation that does state that str and repr are different for floats, please feel free to re-open and link to that section of the documentation so that it can be fixed.)