[Python-3000] A super() idea - no _getframe() involved

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 19 14:14:26 CEST 2006


Guido van Rossum wrote:

> Regarding the syntax, IMO *if* we use this we should do it so that you can write
> 
>     super.foobar(args)

I was thinking of something like

    __super__.foobar(self, args)

i.e. __super__ would just do the work of finding the appropriate
unbound method. This would make using __super__ more like an
ordinary inherited call, and in the case where you only have
one base class, __super__ is a drop-in replacement for the
name of the base class.

And __super__ could just be super if you're happy to have
a new keyword:

    super.foobar(self, args)

--
Greg


More information about the Python-3000 mailing list