[Python-Dev] pickle me, Elmo?

Jeremy Hylton jeremy@zope.com
10 Feb 2003 12:15:46 -0500


On Mon, 2003-02-10 at 12:11, Paul F Dubois wrote:
> I read the new PEP about pickling with much interest and little
> comprehension. I'd like to comment then just by saying what I wish I could
> do and invite response as to whether the PEP will help do it.
> 
> I would like to be able to:
> 
> Save and restore a class definition
> Save and restore a function definition

How would you like that to work?  Do you want to save the source code in
the pickle and have it be compiled on unpickling?  Or do you want to
objects created from compiling a particular source file to be stored in
the pickle and recreated later, regardless of whether the source is
available?

Jeremy