[docs] [issue26241] repr() and str() are identical for floats in 3.5
report at bugs.python.org
Sat Jan 30 04:58:55 EST 2016
Eryk Sun added the comment:
> 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 .
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  and the header file where PyFloat_STR_PRECISION is defined to be 12 digits .
Python tracker <report at bugs.python.org>
More information about the docs