Created
May 23, 2015 14:58
-
-
Save selfcommit/66e43bc51820b1c054ed to your computer and use it in GitHub Desktop.
Pickle an Instance
This file contains 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 _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