1 #!/usr/bin/env python 2 3 class C: 4 def method(self): 5 return 123 6 7 class D: 8 method = C.method # won't rebind to D 9 10 c = C() 11 d = D() 12 result_123 = c.method() 13 result2_123 = d.method(c) # need D instance to function 14 15 # vim: tabstop=4 expandtab shiftwidth=4