pickling a circular object inherited from list

Klaus Kopec klaus.kopec at tuebingen.mpg.de
Wed Dec 10 05:03:12 EST 2008


Ned Deily wrote:
> 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.
> 

Using pickle protocol 2 solved the problem. Thank you all for helping me 
out!




More information about the Python-list mailing list