Persist a class (not an instance)

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Fri Nov 25 09:31:39 EST 2005


Kent Johnson enlightened us with:
> Is there a way to persist a class definition (not a class instance,
> the actual class) so it can be restored later?

>From the docs:

"Similarly, classes are pickled by named reference, so the same
restrictions in the unpickling environment apply. Note that none of
the class's code or data is pickled [...]"

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list