[Python-ideas] Explicit self argument, implicit super argument
Ali Gholami Rudi
aligrudi at gmail.com
Wed Nov 21 05:54:46 CET 2007
On Mon, Nov 19, 2007 at 12:00:04PM -0700, Neil Toronto wrote:
> (Disclaimer: I have no issue with "self." and "super." attribute access,
> which is what most people think of when they think "implicit self".)
I don't feel easy about the new super either (maybe from a different
perspective than Neil's). Why should self be passed to methods using
a parameter but super should use magic (something like a global name
that holds different objects in different places).
Instead of making self implicit, I'd like super to use less magic. I
much preferred super(self).foo(*args). Some magic for finding the
surrounding class might be needed but at least we don't use the first
parameter of a method implicitly. (I don't see this in the
alternative proposals sections of :PEP:`3135`). It can be made
backward compatible, too. I have not read new super discussions; So
sorry if it has been already discussed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the Python-ideas