Calling __init__ with multiple inheritance

Robert Dick dickrp at
Mon Mar 28 21:14:46 CEST 2005

> In the case of Parent diamond inheritance, super() can avoid calling
> the __init__ of parent twice?  How?

Guido has a nice description of it:

It linearizes the graph.  Unfortunately, this means that super delegates to 
siblings.  This makes super incompatible with differences in positional 
arguments within a class hierarchy.  If you want a super that works with 
positional arguments, please see at (also in 
PyPI).  If others don't find problems with the approach, I hope it becomes 
standard.  I found it distracting that python's default argument passing 
approach conflicts with its default delegation approach.

Good luck,

-Robert Dick-

More information about the Python-list mailing list