Skip to content

Instantly share code, notes, and snippets.

@KitWallace
Created August 30, 2012 08:01
Show Gist options
  • Save KitWallace/3523938 to your computer and use it in GitHub Desktop.
Save KitWallace/3523938 to your computer and use it in GitHub Desktop.
overridding getstate so that history is dropped from the pickled object
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