Python 如何检索方法句柄绑定到的对象?

Python 如何检索方法句柄绑定到的对象?,python,python-3.x,introspection,Python,Python 3.x,Introspection,给定Python3中的方法句柄,如何检索它所属的对象 class Myclass: def foo(self): print(self, 'foo') m = Myclass() method_handle = m.foo print(method_handle) # -> <bound method Myclass.foo of <__main__.Myclass object at 0x7fb80220dd10>> class-My

给定Python3中的方法句柄,如何检索它所属的对象

class Myclass:
    def foo(self):
        print(self, 'foo')

m = Myclass()

method_handle = m.foo
print(method_handle) # -> <bound method Myclass.foo of <__main__.Myclass object at 0x7fb80220dd10>>
class-Myclass:
def foo(self):
打印(自我“foo”)
m=Myclass()
方法\u handle=m.foo
打印(方法#句柄)#->

method\u handle
对象在某处引用了
m
实例。但是如果我只有
method\u句柄
,我如何检索
m
对象呢?

没关系,我只是在
method\u句柄中找到了它