diff options
Diffstat (limited to 'Lib/json/encoder.py')
-rw-r--r-- | Lib/json/encoder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index 2d7b898..c8c78b9 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -268,7 +268,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, list=list, str=str, tuple=tuple, - _intstr=int.__str__, + _intstr=int.__repr__, ): if _indent is not None and not isinstance(_indent, str): @@ -307,7 +307,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, elif value is False: yield buf + 'false' elif isinstance(value, int): - # Subclasses of int/float may override __str__, but we still + # Subclasses of int/float may override __repr__, but we still # want to encode them as integers/floats in JSON. One example # within the standard library is IntEnum. yield buf + _intstr(value) |