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:
Mark Dickinson 2009-11-23 20:54:09 +00:00
parent faa25999a3
commit 9dd5e16c5d
6 changed files with 25 additions and 23 deletions

View file

@ -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. */