changeset: 77101:f5f5db593d99 parent: 77098:35c3946657ce parent: 77100:06f21c6e0f2b user: Ezio Melotti date: Mon May 21 17:53:42 2012 -0600 files: Misc/NEWS description: #14875: merge with 3.2. diff -r 35c3946657ce -r f5f5db593d99 Lib/json/encoder.py --- a/Lib/json/encoder.py Mon May 21 20:28:58 2012 +0200 +++ b/Lib/json/encoder.py Mon May 21 17:53:42 2012 -0600 @@ -27,8 +27,7 @@ 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 -r 35c3946657ce -r f5f5db593d99 Misc/NEWS --- a/Misc/NEWS Mon May 21 20:28:58 2012 +0200 +++ b/Misc/NEWS Mon May 21 17:53:42 2012 -0600 @@ -42,6 +42,8 @@ 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

AltStyle によって変換されたページ (->オリジナル) /