pickling a circular object inherited from list

Miki miki.tebeka at gmail.com
Tue Dec 9 17:39:38 CET 2008

Hello Klaus,

> I have a problem with inheritance from list. I want to create a tree
> like object where child nodes are kept in self[:] and every child has a
> field that points to its parent. Pickling such an object, however,
> throws an AssertionError. See below for source code and output of an
> easy example case of my problem.
> 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).

Miki <miki.tebeka at gmail.com>

More information about the Python-list mailing list