Needed: Real-world examples for Python's Cooperative Multiple Inheritance

Steve Holden steve at holdenweb.com
Sun Nov 28 03:13:24 CET 2010


On 11/27/2010 4:34 PM, Steven D'Aprano wrote:
[...]
> The problem isn't writing documentation for the feature, but coming up 
> with real-world use-cases. The documentation for super and the MRO is 
> extensive and detailed. It's also complicated, because multiple 
> inheritance is complicated. But it seems that multiple inheritance might 
> not be that useful outside of a small number of cases.

It isn't. Even inheritance itself isn't as useful as it at first
appears, and composition turns out in practice to be much more useful.
That goes double for multiple inheritance.

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17       http://us.pycon.org/
See Python Video!       http://python.mirocommunity.org/
Holden Web LLC                 http://www.holdenweb.com/




More information about the Python-list mailing list