[Tutor] super() with Multiple Inheritance
Alan Gauld
alan.gauld at btinternet.com
Thu Apr 14 23:33:37 CEST 2011
"James Thornton" <james at jamesthornton.com> wrote
> I found this issue -- I was setting setting self.s to the return
> value
> of super() and trying to use self.s in params():
> ...but this won't work.
No, because super returns whatever the superclass
method returns. Which in init() is usually None.
> You have to use super each time you want to make a
> call to a parent's function. It returns an object with
> an internal queue.
It should return the result of the superclasses method,
whatever that is.
> mechanism from managing multiple inheritance
Or even single inheritance if you want to...
Alan G.
More information about the Tutor
mailing list