Message200062
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) |
|
Date |
User |
Action |
Args |
2013-10-16 16:56:36 | facundobatista | set | recipients:
+ facundobatista |
2013-10-16 16:56:36 | facundobatista | set | messageid: <1381942596.3.0.421261732602.issue19272@psf.upfronthosting.co.za> |
2013-10-16 16:56:36 | facundobatista | link | issue19272 messages |
2013-10-16 16:56:36 | facundobatista | create | |
|