super() doesn't get superclass

Michele Simionato michele.simionato at gmail.com
Wed Sep 19 22:48:13 EDT 2007


On Sep 19, 8:14 pm, Ed Leafe <e... at leafe.com> wrote:
> On Sep 19, 2007, at 6:52 AM, Michele Simionato wrote:
>
> > Well, I am personally *against* multiple inheritance (i.e. IMO it
> > gives more troubles than advantages)
>
>         For the sorts of examples that have been used in this thread, it
> isn't MI that's problematic; it's the poor quality of the design.
>
>         Mixing two complete classes to create a multiply-inherited class is
> almost always the sign of poor design. OTOH, mixin-style classes are
> a wonderful way to ensure consistency across several different
> classes that all need a common behavior added to them. We use mixins
> extensively throughout Dabo, and they allow us to give several
> classes the desired behaviors, while only having one mixin class to
> maintain.

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.

             Michele Simionato




More information about the Python-list mailing list