shortcut for 'self' wish
alex at shindich.com
Sun Mar 4 22:46:26 CET 2001
"Kirby Urner" <urner at alumni.princeton.edu> wrote in message
news:ot11atghgm5cccc9oc8tm2pq453c1n8ukh at 4ax.com...
> "Terry Reedy" <tjreedy at udel.edu> wrote:
> >This is entirely a social convention for publicly displayed code. For my
> >own work, I use s for self (and o for other in __add__(), etc.). Python
> >not a straightjacket.
> I agree with Pilgrim in 'Dive Into Python' that we should
> honor the 'self' convention. These standards make source
> more readable across the board and innovating some local
> idiosyncratic convention just to save keystrokes (or
> whatever) strikes me as self-indulgent.
I completely agree! The "self" convention aids readability. In fact, I would
not mind if Python were to enforce that the first parameter is always called
self. But then again, I have been known for my extremist views.. ;)
More information about the Python-list