Message200066
According to the docs[1]:
12.1.4. What can be pickled and unpickled?
The following types can be pickled:
- None, True, and False
- integers, floating point numbers, complex numbers
- strings, bytes, bytearrays
- tuples, lists, sets, and dictionaries containing only picklable objects
- functions defined at the top level of a module
- built-in functions defined at the top level of a module
- classes that are defined at the top level of a module
- instances of such classes whose __dict__ or the result of calling
__getstate__() is picklable
Notice that lambda is not in that list.
The docs for concurrent.futures.ProcessPoolExecutor[2] state:
17.4.3. ProcessPoolExecutor
The ProcessPoolExecutor class is an Executor subclass that uses a pool of processes to execute calls asynchronously. ProcessPoolExecutor uses the multiprocessing module, which allows it to side-step the Global Interpreter Lock but also means that only picklable objects can be executed and returned.
[1] http://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled
[2] http://docs.python.org/dev/libraryconcurrent.futures.html?highlight=concurrent#processpoolexecutor |
|
Date |
User |
Action |
Args |
2013-10-16 17:50:45 | ethan.furman | set | recipients:
+ ethan.furman, facundobatista, jcea, amaury.forgeotdarc |
2013-10-16 17:50:45 | ethan.furman | set | messageid: <1381945845.42.0.979206073436.issue19272@psf.upfronthosting.co.za> |
2013-10-16 17:50:45 | ethan.furman | link | issue19272 messages |
2013-10-16 17:50:44 | ethan.furman | create | |
|