mirror of
https://github.com/python/cpython.git
synced 2026-05-05 01:51:01 +00:00
Issue #7117, continued: Remove substitution of %g-style formatting for
%f-style formatting, which used to occur at high precision. Float formatting should now be consistent between 2.7 and 3.1.
This commit is contained in:
parent
faa25999a3
commit
9dd5e16c5d
6 changed files with 25 additions and 23 deletions
|
|
@ -957,12 +957,6 @@ format_float_internal(PyObject *value,
|
|||
if (precision < 0)
|
||||
precision = default_precision;
|
||||
|
||||
#if PY_VERSION_HEX < 0x03010000
|
||||
/* 3.1 no longer converts large 'f' to 'g'. */
|
||||
if ((type == 'f' || type == 'F') && fabs(val) >= 1e50)
|
||||
type = 'g';
|
||||
#endif
|
||||
|
||||
/* Cast "type", because if we're in unicode we need to pass a
|
||||
8-bit char. This is safe, because we've restricted what "type"
|
||||
can be. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue