Ethan Furman added the comment: 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 ---------- nosy: +ethan.furman _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19272> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com