Created
August 30, 2012 08:01
-
-
Save KitWallace/3523938 to your computer and use it in GitHub Desktop.
overridding getstate so that history is dropped from the pickled object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __getstate__(self) : | |
odict = self.__dict__.copy() | |
del odict['history'] | |
return odict | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment