[Python-ideas] PEP: Shorthand Symbol for "self"
jimjjewett at gmail.com
Mon Aug 25 02:17:09 CEST 2008
On Sun, Aug 24, 2008 at 6:43 PM, Russ Paielli <russ.paielli at gmail.com> wrote:
> ... I fully understand the history
> and controversy regarding the explicit use of "self" in Python.
One of the problems with the current syntax is that calling sites
don't match the definition site the way they do for normal functions.
This proposal doesn't seem to help with that.
Normal function --
def fn(a, b, z=None): ...
fn(a, b, z)
def m(self, a, b, z=None): ...
# self is moved outside the parens, changing the tuple size
self.m(a, b, z)
More information about the Python-ideas