[ python-Bugs-839075 ] Document that highly recursive data cannot
be pickled
SourceForge.net
noreply at sourceforge.net
Mon Nov 10 02:21:23 EST 2003
Bugs item #839075, was opened at 2003-11-10 07:21
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=839075&group_id=5470
Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Simon David Burton (simonb1)
Assigned to: Nobody/Anonymous (nobody)
Summary: Document that highly recursive data cannot be pickled
Initial Comment:
Make a note in section 3.4.14 Python Library Reference
(perhaps a footnote?) that higly recursive data
stuctures cannot be pickled. Setting the stack limit
helps a bit, but does not scale to large networks of data.
eg.
#!/usr/bin/env python
import cPickle as pickle
#import pickle
import os
#sys.setrecursionlimit(4000)
N = 2048
print "building..."
nest = [ [] for i in range(N) ]
for i in range(N):
for j in range(N):
nest[i].append( nest[j] )
print "dumping..."
file = open("nest.pkl","wb")
try:
pickle.dump( nest, file )
except RuntimeError, e:
print e
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=839075&group_id=5470
More information about the Python-bugs-list
mailing list