[Python-Dev] adding save() and load() function for interactive use (original) (raw)
Phillip J. Eby pje at telecommunity.com
Mon Dec 1 14:06:57 EST 2003
- Previous message: [Python-Dev] adding save() and load() function for interactive use
- Next message: [Python-Dev] adding save() and load() function for interactive use
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 07:30 PM 12/1/03 +0100, Gerrit Holl wrote:
save() is easily implemented by pickling locals(); load() is easily implemented by updating locals() while unpickling it.
Functions and classes are pickled as references to a module, so this wouldn't actually work. When you try to load(), the unpickling will fail if the function or class doesn't already exist in the module.
- Previous message: [Python-Dev] adding save() and load() function for interactive use
- Next message: [Python-Dev] adding save() and load() function for interactive use
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]