"inherited" keyword in Python?

Carsten Gaebler cg at schlund.de
Tue Dec 5 09:20:54 EST 2000


Alex Martelli wrote:

> "Carsten Gaebler" <cg at schlund.de> wrote in message
> news:3A2B9EFA.3A64C13B at schlund.de...

> > Does Python know something like the "inherited" keyword from Borland
> > Pascal? 

> class SomeClass(ABaseClass,AnotherOne,YetAnother):
>     __super = AnotherOne
>     # etc, etc
>     def somemethod(self, foo, bar):
>         print "before"
>         __super.somemethod(self, foo, bar)
>         print "after"


Yes, that'll do, thanks!

cg.



More information about the Python-list mailing list