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

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Nov 21 00:48:36 CET 2007


ntoronto at cs.byu.edu wrote:
> There are two common method-calling cases, and an uncommon one.
> In order of expected number of occurrences, with #3 being quite low:
> 
> 1. self.method(...)
> 
> 2. super.method(...)
> 
> 3. DistantParent.method(self, ...)

You're still missing an important case. I would rank
them as

1. self.method(...)

2. DirectParent.method(self, ...)

3. super.method(...)

4. DistantParent.method(self, ...)

Anything that made number 2 difficult would be unacceptable.

--
Greg



More information about the Python-ideas mailing list