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

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Aug 26 03:16:23 CEST 2008

Brandon Mintern wrote:
> The more characters available, the
> more expressive the names can be,

Also the more confusing they can be.

It's bearable in Lisp because there are very few
characters that have special meaning to the parser,
and most symbols are set off by whitespace or

But in Python, most punctuation is syntactically
special, and names are set off by operators at
least as often as whitespace. So allowing just a
few randomly-chosen punctuation chars as part of
names would be confusing, I think.

I find that Ruby code with ! and ? in variable
names trips up my visual parser, for example. I
see something like


and it looks like the name 'set' followed by
a '!' operator.


More information about the Python-ideas mailing list