pickling a circular object inherited from list

Ned Deily nad at acm.org
Tue Dec 9 21:13:35 CET 2008


In article <ghmchi$rhh$1 at ger.gmane.org>,
 Klaus Kopec <klaus.kopec at tuebingen.mpg.de> wrote:
> >> What did I do wrong?
> > Old Python version? :)
> > Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's
> > fixed there as well).
> It works for me with v3.0 as well, but not with v2.6.1 (same error as 
> stated before for v2.4).
> 
> Is there any way to fix this in v2.6.1 or even v2.4? Right now I cannot 
> switch to v3.0 because I depend on several not compatible packages 
> (numpy, biopython, ...)

It looks like your example can be made to work by either specifying 
pickle protocol 2 or by switching to cPickle.

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list