>>>>> "JRA" == Jay R Ashworth <[EMAIL PROTECTED]> writes:
JRA> Because then, at least old unchanged objects which were read
JRA> in by the 'code inside the object' wouldn't break: they'd
JRA> just have to pick up the default for that attribute. When
JRA> you wrote them *back out*, they'd automagically be fixed.
This happens now, since once that attribute's on the MailList object,
it'll get written back out to the .db file.
>> Marshals, BTW, exist primarily to support caching of compiled
>> byte code. A .pyc file is a marshal with a little bit of
>> header information. They also happen to be an efficient way to
>> store and load simple Python objects. Pickles are better for
>> more complex objects (e.g. instances, or cyclic data
>> structures).
JRA> Are pickles less prone to break the "objectization" of
JRA> objects you're going to want persistent storage of?
I'm not sure I understand the question. Marshal only handles built-in
types (ints, longs, dicts, lists, tuples) and wasn't designed to
handle instances. That's what pickle is for (and see the cPickle
module for a really fast implementation of the pickle protocol).
-Barry
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers