We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24cc78a commit 27f204dCopy full SHA for 27f204d
Objects/stringlib/formatter.h
@@ -934,8 +934,12 @@ format_float_internal(PyObject *value,
934
935
if (precision < 0)
936
precision = 6;
937
+
938
+#if PY_VERSION_HEX < 0x03010000
939
+ /* 3.1 no longer converts large 'f' to 'g'. */
940
if ((type == 'f' || type == 'F') && fabs(val) >= 1e50)
941
type = 'g';
942
+#endif
943
944
/* Cast "type", because if we're in unicode we need to pass a
945
8-bit char. This is safe, because we've restricted what "type"
0 commit comments