summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-05-21 23:49:06 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-05-21 23:49:06 (GMT)
commit898d51da4d2db44d71809ee84089877f5c08f3fd (patch)
treeb40cdc91af32b5f8961fbaf86518a62fad822a60 /Lib
parentdfa465243c94b540099c413eb79b2774b40bb82e (diff)
downloadcpython-898d51da4d2db44d71809ee84089877f5c08f3fd.zip
cpython-898d51da4d2db44d71809ee84089877f5c08f3fd.tar.gz
cpython-898d51da4d2db44d71809ee84089877f5c08f3fd.tar.bz2
#14875: Use float('inf') instead of float('1e66666') in the json module.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/json/encoder.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index 4b214eb..75b7f49 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):