super() doesn't get superclass

thebjorn BjornSteinarFjeldPettersen at gmail.com
Thu Sep 20 01:37:30 EDT 2007


On Sep 19, 3:41 pm, Michele Simionato <michele.simion... at gmail.com>
wrote:
> On Sep 19, 3:22 pm, Sion Arrowsmith <si... at chiark.greenend.org.uk>
> wrote:
>
> > Ben Finney  <bignose+hates-s... at benfinney.id.au> wrote:
>
> > > If a function is named 'super' and operates on
> > >classes, it's a pretty strong implication that it's about
> > >superclasses.
>
> > But it doesn't (under normal circumstances) operate on classes.
> > It operates on an *instance*. And what you get back is a (proxy
> > to) a superclass/ancestor of the *instance*.
>
> > (And in the super(A, B) case, you get a superclass/ancestor of
> > *B*. As has just been said somewhere very near here, what is
> > misleading is the prominence of A, which isn't really the most
> > important class involved.)
>
> Happily A (and B too) will become invisible in Python 3000.
>
>     Michele Simionato

This is great news! Since it is for Py3K it seems clear to me that
super should be a keyword as well (but historically I'm not the best
at channeling Guido ;-)

-- bjorn






More information about the Python-list mailing list