Saving recursive objects to disc. cPickle wan't work.

Lutz Horn lutz-horn at web.de
Wed May 26 10:34:00 EDT 2004


Hi,

* Alex Polite <m4 at polite.se> [26 May 2004 14:22:21 GMT]:
> I need to put recursive data structures on disc and found out that
> cPickle doesn't like recursion.

Hm, the documentation of Python 2.3.2, Section 3.14.1 "Relationship to
other Python modules" states that recursive objects, which are defined
as "objects that contain references to themselves" can't be handled by
marshal, but that pickle and cPickle should be fine: "pickle stores
such objects only once, and ensures that all other references point to
the master copy".

What exactly are your problems?

Regards
Lutz
-- 
pub  1024D/6EBDA359 1999-09-20 Lutz Horn <lutz-horn at web.de>
Key fingerprint = 438D 31FC 9300 CED0 1CDE  A19D CD0F 9CA2 6EBD A359
sub  2048g/EA8CFEDE 2000-03-09



More information about the Python-list mailing list