[Python-Dev] Breaking calls to object.__init__/__new__

Guido van Rossum guido at python.org
Thu Mar 22 05:41:05 CET 2007


On 3/21/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Every time I've considered using super, I've eventually
> decided against it for reasons like this. I've always
> found a better way that doesn't introduce so may
> strange interactions between the classes involved.

I end up feeling the same way, for purely pragmatic reasons. However,
cooperative multiple inheritance is a respected religion, and when
practiced systematically can work well.

Also make a big distinction between super calls of __init__ (which are
a Pythonic wart and don't exist in other languages practicing multiple
inheritance AFAIK) and super calls of regular methods (which are
virtually problem-free as long as you agree on a base class that
defines a method and derive from that class when you want to extend
it).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list