Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4226543

Browse files
committed
#14875: merge with 3.2.
2 parents 945a3ad + 898d51d commit 4226543

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/json/encoder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
ESCAPE_DCT.setdefault(chr(i), '\\u{0:04x}'.format(i))
2828
#ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
2929

30-
# Assume this produces an infinity on all machines (probably not guaranteed)
31-
INFINITY = float('1e66666')
30+
INFINITY = float('inf')
3231
FLOAT_REPR = repr
3332

3433
def encode_basestring(s):

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Core and Builtins
4242
Library
4343
-------
4444

45+
- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
46+
4547
- Issue #13585: Added contextlib.ExitStack
4648

4749
- PEP 3144, Issue #14814: Added the ipaddress module

0 commit comments

Comments
 (0)