Skip to content

Instantly share code, notes, and snippets.

@selfcommit
Created May 23, 2015 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selfcommit/66e43bc51820b1c054ed to your computer and use it in GitHub Desktop.
Save selfcommit/66e43bc51820b1c054ed to your computer and use it in GitHub Desktop.
Pickle an Instance
def _pickle_method(m):
if m.im_self is None:
return getattr, (m.im_class, m.im_func.func_name)
else:
return getattr, (m.im_self, m.im_func.func_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment