Categories October Surprise 2024 python – How to pickle yourself? – Stack Overflow Post author By Post date September 25, 2026 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)