[Tutor] Why super does not work !
Alan G
alan.gauld at btinternet.com
Tue Jan 18 02:32:39 CET 2011
Steven D'Aprano <steve <at> pearwood.info> writes:
> fact that multiple inheritance itself is often the wrong thing to use,
> and even when it is right, it is often tricky to get it right. To put it
> another way: don't use multiple inheritance unless you have to, there
> are better ways, such as by composition.
Or use a language where MI is the normal and idiomatic way
to do things because the language assumes it and so it just
works. There are very few such languages but Lisp is one :-)
Sadly Python isn't, and when using MI I always avoid super()
Which is a huge shame since MI is where super() should
be most useful... But in my experience MI in Python is
definitely a place where explicit is better than implicit.
Alan G.
More information about the Tutor
mailing list