This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hinsen
Recipients
Date 2002-09-24.17:54:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=11850

Of course:

import copy_reg

def get_method(object, name):
    klass = object.__class__
    fn = klass.__dict__[name]
    return new.instancemethod(fn, object, klass)

def pickle_bound_method(method):
    return get_method, (method.im_self, method.__name__)

class _Foo:
    def bar(self):
        pass

_foo = _Foo()

copy_reg.constructor(get_method)
copy_reg.pickle(type(_foo.bar), pickle_bound_method)
History
Date User Action Args
2007-08-23 16:02:13adminlinkissue558238 messages
2007-08-23 16:02:13admincreate