summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-05-21 23:53:42 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-05-21 23:53:42 (GMT)
commit422654349045c3abdc4fa923aa6538fd6a4e04b6 (patch)
tree18c676c1dc8bf9de0b47a0003032d9f918c72c4b
parent945a3ada7f5f57552214a47cbd0de828f19d0246 (diff)
parent898d51da4d2db44d71809ee84089877f5c08f3fd (diff)
downloadcpython-422654349045c3abdc4fa923aa6538fd6a4e04b6.zip
cpython-422654349045c3abdc4fa923aa6538fd6a4e04b6.tar.gz
cpython-422654349045c3abdc4fa923aa6538fd6a4e04b6.tar.bz2
#14875: merge with 3.2.
-rw-r--r--Lib/json/encoder.py3
-rw-r--r--Misc/NEWS2
2 files changed, 3 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):
diff --git a/Misc/NEWS b/Misc/NEWS
index ae4f7aa..eaa9014 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -42,6 +42,8 @@ Core and Builtins
Library
-------
+- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
+
- Issue #13585: Added contextlib.ExitStack
- PEP 3144, Issue #14814: Added the ipaddress module