Bugs item #1233578, was opened at 2005-07-06 10:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1233578&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Charles (melicertes) Assigned to: Nobody/Anonymous (nobody) Summary: Pickle protocols 1, 2 can't handle "inf" floats. Initial Comment: Python 2.4.1 on an AMD64 system. The pickle module barfs with a "SystemError: frexp() result out of range" if an "inf" float value is pickled with pickle protocol 1 or 2. It works fine with the old protocol 0. Minimal test case: >>> import pickle >>> o = 2e308 >>> print o inf >>> pickle.dumps(o, protocol=0) 'Finf\n.' >>> >>> pickle.dumps(o, protocol=1) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/pickle.py", line 1386, in dumps Pickler(file, protocol, bin).dump(obj) File "/usr/lib/python2.4/pickle.py", line 231, in dump self.save(obj) File "/usr/lib/python2.4/pickle.py", line 293, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib/python2.4/pickle.py", line 489, in save_float self.write(BINFLOAT + pack('>d', obj)) SystemError: frexp() result out of range >>> >>> pickle.dumps(o, protocol=2) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/pickle.py", line 1386, in dumps Pickler(file, protocol, bin).dump(obj) File "/usr/lib/python2.4/pickle.py", line 231, in dump self.save(obj) File "/usr/lib/python2.4/pickle.py", line 293, in save f(self, obj) # Call unbound method with explicit self File "/usr/lib/python2.4/pickle.py", line 489, in save_float self.write(BINFLOAT + pack('>d', obj)) SystemError: frexp() result out of range ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1233578&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com