Finding in which class an object's method comes from

ast nomail at
Thu Feb 4 03:25:59 EST 2016


Suppose we have:

ClassC inherit from ClassB
ClassB inherit from ClassA
ClassA inherit from object

Let's build an object:

obj = ClassC()

Let's invoke an obj method


funct is first looked in ClassC, then if not found
on ClassB, then ClassA then object

But is there a command to know where funct is
found ?


More information about the Python-list mailing list