the python pickle is used to serialize objects handy tool, but requires pickle incoming object is not an internal class can not be a function of lambda.
For example, try to pickle the inner class:
The results will complain AttributeError: Can't pickle local object
.
This problem can be solved by third-party libraries dill: ( https://pypi.org/project/dill/ )
result:
dill addition to the standard type of process may be treated pickle:
Ah, or good use.
(Further built library python pickle shelve also used to do back-end, it is not the default classes and Handling lambda functions.)