From b715bfee8f04d7b46fba62ec9d9ab95fe1a61ffd Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 8 May 2017 18:18:48 +0300 Subject: Remofe remnants of Python 2.4 support. Clean up the code by removing workarounds for supporting Python 2.4. --- simplejson/decoder.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'simplejson/decoder.py') diff --git a/simplejson/decoder.py b/simplejson/decoder.py index 29de124..48f46c9 100644 --- a/simplejson/decoder.py +++ b/simplejson/decoder.py @@ -24,11 +24,7 @@ FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): if sys.version_info < (2, 6): _BYTES = '7FF80000000000007FF0000000000000'.decode('hex') - # The struct module in Python 2.4 would get frexp() out of range here - # when an endian is specified in the format string. Fixed in Python 2.5+ - if sys.byteorder != 'big': - _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1] - nan, inf = struct.unpack('dd', _BYTES) + nan, inf = struct.unpack('>dd', _BYTES) else: nan = float('nan') inf = float('inf') -- cgit v1.2.1