trouble understanding inheritance...

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Aug 27 15:53:14 EDT 2006


Steven D'Aprano a écrit :
(snip)
> class BaseClass():
>     def foo(self):
>         return "foo"
> 
> class Foo(BaseClass):
>     def foo(self):
>         return self.__class__.foo() # call the parent class method

Err... May I suggest that you re-read the Fine Manual ?



More information about the Python-list mailing list