[Python-Dev] Things to Know About Super
Steve Holden
steve at holdenweb.com
Tue Aug 26 23:10:10 CEST 2008
Michele Simionato wrote:
> On Tue, Aug 26, 2008 at 5:32 PM, Raymond Hettinger <python at rcn.com> wrote:
[...]
>> I think it is a non-sequiter to reason from "diamond diagrams are
>> complicated" to "mixins should be disallowed". Instead, I think it better
>> to simply recommend that a key to happiness is to keep various mixin classes
>> completely orthogonal to one another (no overlapping method names).
>
> 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".
>
If you aren't aware of it you should take a look at Enthought's traits
package. It's part of the Enthought Tool Suite (ETS).
https://svn.enthought.com/enthought/wiki
While I too appreciate your comments about super I believe you have
perhaps overdone it. I do look forward to seeing the edited edition as a
part of the documentation. [Hint: the *docs* aren't in feature freeze ;-)]
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-Dev
mailing list