[Python-Dev] Things to Know About Super

Michele Simionato michele.simionato at gmail.com
Wed Aug 27 05:48:06 CEST 2008

On Tue, Aug 26, 2008 at 6:13 PM, Michele Simionato
<michele.simionato at gmail.com> wrote:
> I not completely against multiple inheritance. I am against multiple inheritance
> as it is now. A restricted form of multiple inheritance in which mixins classes
> are guaranteed to be orthogonal would be fine with me (provided it is
> not abused).
> This concept exists already in other languages, the orthogonal mixins
> are called "traits".

I must correct myself here. Even if for practical purposes traits look
like a restricted multiple
inheritance, in principle it is better to think of them as of an
enhanced single inheritance.
With traits there is always a single superclass: traits are just
single inheritance with a nice
syntax to include methods (like in Ruby) and a guarantee that methods
will not be overridden
silently (this one is missing in Ruby).


More information about the Python-Dev mailing list