Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?
Jean-Michel Pichavant
jeanmichel at sequans.com
Fri Jul 30 05:09:20 EDT 2010
Steven D'Aprano wrote:
> On Thu, 29 Jul 2010 19:29:24 +0200, Jean-Michel Pichavant wrote:
>
>
> [snip]
>> As someone already said in this list, the main problem with super is
>> that it tends to refer to the superclass method while in fact it calls
>> the next MRO method.
>>
>
> Why do you think that is a problem? That's what it is supposed to do,
> because that's what is needed to correctly implement multiple inheritance.
>
>
>
>> "mro" would have been the proper name for "super".
>>
>
> That's your opinion. In any case, whether super() was called super() or
> mro() or aardvark() makes no difference to the functionality or whether
> it is useful.
>
>
>
>
I have no problem with dogs nor cats, however I have problem with cats
called dogs and dogs called cats as I'm dealing with industrial
programming, not litterature nor poetry.
JM
More information about the Python-list
mailing list