[ python-Bugs-880990 ] Float infinity unpicklable with BINFLOAT-using protocols

SourceForge.net noreply at sourceforge.net
Tue Jan 20 19:20:07 EST 2004


Bugs item #880990, was opened at 2004-01-20 19:20
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=880990&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jp Calderone (kuran)
Assigned to: Nobody/Anonymous (nobody)
Summary: Float infinity unpicklable with BINFLOAT-using protocols

Initial Comment:
>>> import pickle
>>> pickle.dumps(1e100000, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.3/pickle.py", line 1386, in dumps
    Pickler(file, protocol, bin).dump(obj)
  File "/usr/lib/python2.3/pickle.py", line 231, in dump
    self.save(obj)
  File "/usr/lib/python2.3/pickle.py", line 293, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.3/pickle.py", line 489, in
save_float
    self.write(BINFLOAT + pack('>d', obj))
SystemError: frexp() result out of range


Prior to BINFLOAT, float infinity could successfully be
pickled.  The right thing to do here seems to be to
catch the exception and fall back to a FLOAT (string
representation) token.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=880990&group_id=5470



More information about the Python-bugs-list mailing list