super() doesn't get superclass
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Wed Sep 19 07:55:07 EDT 2007
Michele Simionato a écrit :
> On Sep 19, 12:36 pm, Bruno Desthuilliers <bruno.
> 42.desthuilli... at wtf.websiteburo.oops.com> wrote:
>
>> The next class in the MRO *is* a superclass of the *instance*. Else it
>> wouldn't be in the MRO !-)
>
> Bruno, there is no such a thing as a superclass in a multiple
> inheritance
May I disagree ? Of course, with MI, there's no such thing as "the"
superclass, but there are still superclasses - the classes listed in the
MRO. At least according to a commonly agreed definition of "superclass"...
(snip)
>> Well, I understand that you disagree with both the documention and the
>> name of super. As far as I'm concerned, the mere fact that this
>> discussion happens is probably a sign that there's something to be fixed
>> here - at least wrt documentation, possibly wrt/ naming. But the
>> *feature* by itself is certainly something we do want to keep, whatever
>> some may argue.
>
> Well, I am personally *against* multiple inheritance (i.e. IMO it
> gives more
> troubles than advantages)
Given Python's type system and support for delegation, it's a fact that
MI is not that necessary - FWIW, I don't remember having ever used it
except in Zope2 (where it's commonly a PITA).
Now I don't think there's any reason to remove from MI, since it's
already there, and about as usable as it can be.
More information about the Python-list
mailing list