In article <[email protected]>,
 Steven D'Aprano <[email protected]> wrote:

> On Sun, 23 Jun 2013 15:24:14 -0400, Roy Smith wrote:
> 
> > In article <[email protected]>,
> >  Steven D'Aprano <[email protected]> wrote:
>  
> >> What else would you call a function that does lookups on the current
> >> object's superclasses?
> > 
> > Well, mro_lookup() would have been a better choice.  Super() has an
> > obvious meaning, which just happens to be wrong.
> 
> This "obvious but wrong" meaning isn't the least bit obvious to me. Care 
> to give me a hint? The only thing I can think of is:
> 
> - if you are familiar with single inheritance;

True.

> - but unfamiliar with multiple inheritance;

False.  Although, I'm pretty sure that all the times I've used MI (in 
both Python and C++), it was of the mix-in variety.

> - then you might assume that super means "return the superclass of this 
> class" (or possibly instance). 

That's exactly what I assumed.  And, since you correctly surmised that 
that's what I would assume, I would suggest that it was pretty obvious 
to you too.  Of course, given that assumption, it was not at all clear 
what it would do in a class with multiple ancestors.

> I don't think that counts as "obvious". Or at least not "intuitive" :-)

Obvious is in the mind of the observer.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to