[Python-ideas] PEP: Shorthand Symbol for "self"

Russ Paielli russ.paielli at gmail.com
Mon Aug 25 07:04:22 CEST 2008


On Sun, Aug 24, 2008 at 9:39 PM, Brett Cannon <brett at python.org> wrote:

> On Sun, Aug 24, 2008 at 7:25 PM, Russ Paielli <russ.paielli at gmail.com>
> wrote:
>
> > Think about this way: it's 80% less clutter.  I am a compulsive
> minimalist,
> > and one of the reasons I like Python is because it minimizes clutter. I
> > probably let clutter bother me more than I should. I really appreciate
> the
> > lack of semicolons all over the place. Some would call that trivial, but
> I
> > call it significant.
>
> You call it clutter, I call it information. We have kept 'self'
> explicit for a reason; it's self-documenting.
>

First,  "self."  conveys no more "information" than the "$" I am proposing,
but it requires five times as many characters. If that's not clutter, I
don't know what is.

Second, "self." actually conveys *less* information than "$", because it's
meaning depends on whether or not the first formal argument was actually
"self".

For the record, I gladly concede that I probably don't know as much about
Python as most of the other people on this mailing list (as I wrote earlier,
I am an aerospace engineer). But I also sense that many Python experts have
a blind spot on this matter for some reason. I guess these folks are just so
used to seeing "self." everywhere that it has burned itself into their brain
to the point that they don't see it as the clutter that it is.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20080824/e4f161b6/attachment.html>


More information about the Python-ideas mailing list