Q? Calling nearest inherited method
Oleg Broytmann
phd at phd.russ.ru
Wed May 17 07:54:53 EDT 2000
On Wed, 17 May 2000, Laurent POINTAL wrote:
> Given a class hierarchy like this:
> A
> 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
> defined...
I think B.dothis() will do it just right, no?
Oleg. (All opinions are mine and not of my employer)
----
Oleg Broytmann Foundation for Effective Policies phd at phd.russ.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list