Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve error string formatting
  • Loading branch information
fnesveda committed Dec 19, 2022
commit ece854052060aa91bb0c4209bfcdda6de8dcc126
4 changes: 2 additions & 2 deletions Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,8 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj)
if (!s->allow_nan) {
PyErr_Format(
PyExc_ValueError,
"Out of range float values are not JSON compliant: %s",
PyOS_double_to_string(i, 'r', 0, 0, NULL)
"Out of range float values are not JSON compliant: %R",
obj
);
return NULL;
}
Expand Down