This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author facundobatista
Recipients facundobatista
Date 2013-10-16.16:56:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za>
In-reply-to
Content
This is ok:

Python 3.4.0a3+ (default:86af5991c809, Oct 13 2013, 16:42:52) 
...
>>> import pickle
>>> def f():  
...   pass
... 
>>> pickle.dumps(f)
b'\x80\x03c__main__\nf\nq\x00.'


However, when trying to pickle a lambda, it fails:
>>>         
>>> pickle.dumps(lambda: None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle <class 'function'>: attribute lookup builtins.function failed


(Found this because I'm getting the same problem but when trying to use concurrent.futures.ProcessExecutor)
History
Date User Action Args
2013-10-16 16:56:36facundobatistasetrecipients: + facundobatista
2013-10-16 16:56:36facundobatistasetmessageid: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za>
2013-10-16 16:56:36facundobatistalinkissue19272 messages
2013-10-16 16:56:36facundobatistacreate