Categories
October Surprise 2024

python – How to pickle yourself? – Stack Overflow

I want my class to implement Save and Load functions which simply do a pickle of the class. But apparently you cannot use ‘self’ in the fashion below. How can you do this? self = cPickle.load(f)