diff options
Diffstat (limited to 'Modules/_json.c')
| -rw-r--r-- | Modules/_json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index c301546..2d66083 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -1960,8 +1960,8 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj) return PyString_FromString("NaN"); } } - /* Use a better float format here? */ - return PyObject_Repr(obj); + /* Make sure to use the base float class repr method */ + return PyFloat_Type.tp_repr(obj); } static PyObject * |
