summaryrefslogtreecommitdiff
path: root/Lib/json/encoder.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-05-21 17:49:06 -0600
committerEzio Melotti <ezio.melotti@gmail.com>2012-05-21 17:49:06 -0600
commit65be06104dd6a884c57f98ed671260af7e457831 (patch)
tree2126029fb533d9a483ec8d8f9ee08f29227101d9 /Lib/json/encoder.py
parentba227e986a06ced0d0901b704fc4bf0b013a134d (diff)
downloadcpython-65be06104dd6a884c57f98ed671260af7e457831.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.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index 4b214eb60e..75b7f494b3 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):