A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-January/019641.html below:

self vs. _ in new Norvig's book

[Python-Dev] OT: style convention: self vs. _ in new Norvig's book [Python-Dev] OT: style convention: self vs. _ in new Norvig's bookJason Orendorff jason@jorendorff.com
Mon, 21 Jan 2002 18:06:51 -0600
Peter Norvig wrote:
> Guido van Rossum wrote:
> > I hear that in the Lisp world, when someone complains about the
> > parentheses, the standard response is "once you're used to it, the
> > parentheses disappear".  So it is for Python's 'self'.  :-)
> 
> That may be a good analogy, and as I said, I'm willing to try.

It's an excellent analogy:  both statements are about 1/3 true
in my experience.  :-)

> But I still think one character is easier to ignore than four,
> and that there is no compelling argument for 'self' over '_',
> while there is a positive reason for parens (ease of automated
> parsing tools).

There is no especially compelling reason for Python to have
'self' over '_' or 'me' or '@' or ''.

However, there is a compelling reason for you to choose 'self':
"Prefer the standard to the offbeat."  --Strunk and White

## Jason Orendorff    http://www.jorendorff.com/





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4