[Python-ideas] Explicit self argument, implicit super argument

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 20 02:23:40 CET 2007

Neil Toronto wrote:

> class A(object):
>      def method(self, x, y):
>          self.x = x
>          super.method(y)

Is that really how it's going to be? What if self isn't
called 'self'?

I would rather see

           super.method(self, y)

>  From an *implementation standpoint*, making self implicit - a cell 
> variable like super, for example - would wreak havoc with the current 
> bound/unbound method distinction, but I'm not so sure that's a bad thing.

What happens to explicit inherited method calls? If they
become impossible or awkward, it's very definitely a bad


More information about the Python-ideas mailing list