diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-05-21 17:46:55 -0600 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-05-21 17:46:55 -0600 |
commit | ed8cf7a543b3ebe2d61c16d0f87e60029fd2c478 (patch) | |
tree | 0dabfff15936e7d3bce7e2683bd07a2c677c7fb1 /Lib/json/encoder.py | |
parent | 5f045ea4409ce58c6c886cb2922c88ae73ee9ce6 (diff) | |
download | cpython-git-ed8cf7a543b3ebe2d61c16d0f87e60029fd2c478.tar.gz |
#14875: Use float('inf') instead of float('1e66666') in the json module.
Diffstat (limited to 'Lib/json/encoder.py')
-rw-r--r-- | Lib/json/encoder.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index 906c46216a..b0d745b5dc 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -27,8 +27,7 @@ for i in range(0x20): ESCAPE_DCT.setdefault(chr(i), '\\u{0:04x}'.format(i)) #ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,)) -# Assume this produces an infinity on all machines (probably not guaranteed) -INFINITY = float('1e66666') +INFINITY = float('inf') FLOAT_REPR = repr def encode_basestring(s): |