dmitrey wrote:
> This doesn't work for
> costlyFunction2 = lambda x: 11
> as well; and it doesn't work for imap, apply_async as well (same
> error).
> So, isn't it a bug, or it can be somehow fixed?
> Thank you in advance, D.

It's not a bug but a limitation of the pickle protocol. Pickle can't
handle nested functions or classes. As a rule of thumb pickle can only
handle functions and classes that are accessible via a dotted name, e.g.
package.module.SomeClass.somefunction or anothermodule.afunction.

Christian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to