[Python-ideas] PEP: Shorthand Symbol for "self"
phd at phd.pp.ru
Tue Aug 26 08:43:22 CEST 2008
On Mon, Aug 25, 2008 at 06:41:06PM -0700, Russ Paielli wrote:
> Just for fun, I made a copy of one of my Python files with hundreds of
> occurrences of "self", and I replaced them all with "S". This streamlines
> things significantly, and I think it looks good, but I suppose most Python
> aficionados would be aghast. I'm thinking about doing it permanently for all
> my files. I normally avoid single-character names, but I think this case
> could be a reasonable exception. What would you think if you saw this in
> "production" code?
I'd be against it because it violates a well-established convention.
I consider having a One True Style (a naming convention in this particular
case) is a Good Thing. I am accustomed to that naming convention; if I see
code with a different convention I'd have problems reading and
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-ideas