super() doesn't get superclass

Michele Simionato michele.simionato at gmail.com
Thu Sep 20 11:36:31 EDT 2007


On Sep 20, 4:31 pm, "Marshall T. Vandegrift" <llas... at gmail.com>
wrote:
> Michele Simionato <michele.simion... at gmail.com> writes:
> > I am not against mixins (even if I am certainly very much against the
> > *abuse* of mixins, such as in Zope 2). What I would advocate (but I
> > realize that it will never happen in Python) is single inheritance +
> > mixins a la Ruby.
>
> Ruby might be a bad example here.  Although the Ruby language syntax
> only supports single inheritance, mixins are implemented as multiple
> inheritance under the hood.  That is, inheriting from a class and
> including a class as a mixin modifies the sub-/mixing class in exactly
> the same way.
>
> -Marshall

The difference is that there is no cooperation, so you don't need to
bang your
head in order to understand the method resolution order.

     Michele Simionato




More information about the Python-list mailing list