from __future__ import print_function import weakref class Test(object): def method(self): return type(self) def test(obj): print(type(obj), "=>", obj.method()) o = Test() test(o) test(weakref.proxy(o))