Pickle

Here is a bit more about the Pickle and how you can customize how the pickling process work, use __getstate__ to customize how things got pickle.dumps and use __setstate__ to customize how things got pickle.loads.

It is not recommended but you can also use __reduce__ if you know what you are doing.

__getstate__ and __setstate__

Screen Shot 2019-10-27 at 11.00.40 PM

__reduce__

Screen Shot 2019-10-27 at 11.18.30 PM

Leave a comment