Is it advisable to replace 'self' with '_' or 'I' or something shorter?

Erik Max Francis max at alcyone.com
Sun Jan 12 20:20:19 EST 2003


Dan Schmidt wrote:

> I used to use _, but I decided to be a good citizen and use self these
> days.  My main problem with self is not that it takes more time to
> type but that it looks like just another word when I'm scanning code,
> which distracts me from the 'real' variables.  So I modifed my emacs
> python-mode so that self is displayed in a different color, and I can
> deal with it a lot better now.

Try getting the latest version of python-mode.el.  It already highlights
`self' in this way.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Love is like war:  easy to begin but very hard to stop.
\__/ H.L. Mencken
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.




More information about the Python-list mailing list