Q? Calling nearest inherited method

Laurent POINTAL pointal at lure.u-psud.fr
Wed May 17 07:53:06 EDT 2000


I know the Class.Method(self,params) to call method as it is defined
in a specific class. But my problem is the "specific"...

Given a class hierarchy like this:
B inherits A
C inherits B

A define dothis method.
C define dothis method.

In the C.dothis, I wants to call my nearest parent class dothis
method. That is, call B.dothis if it is defined, or A.dothis if it is

Do you know how to do this?


Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : pointal at lure.u-psud.fr  ou  lpointal at planete.net 

More information about the Python-list mailing list