[Twisted-Python] pickle apparently doesn't go with curry ...

Patrick K. O'Brien pobrien at orbtech.com
Tue Nov 12 10:24:37 MST 2002


On Tuesday 12 November 2002 11:06 am, Steve Waterbury wrote:
> Twisted Gurus:

Not yet, but I'd like to be one day. ;-)

> I'm using the "curry" recipe from the Python Cookbook
> (pretty much verbatim), and it appears to work fine in my
> code, but cPickle isn't happy about it:

The short answer is that Python doesn't currently pickle nested class 
and fucntion objects, i.e. those not defined at the top level of the 
module. This may change in the future, and there was just some 
discussion about this on the python-dev list last week (including some 
clever hacks that might work for you as well) Start here and browse the 
archive by thread:

http://mail.python.org/pipermail/python-dev/2002-November/029874.html

You might also find some useful information in an article I just wrote 
about Python's pickling capabilities:

http://www.ibm.com/developerworks/library/l-pypers.html

Hope that helps.

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------





More information about the Twisted-Python mailing list