Edward Elliott  <[EMAIL PROTECTED]> wrote:
>If compactness is all you want, shorten self to s.  Personally I like 'me'
>as it's both shorter and more vernacular:
>
>def do_GET (me):
>    me.send_response (200, "ok")

Absolutely. I've written quite a lot of code (which I wasn't expecting
anyone else to maintain) using 'I' for the same reasons. Plus, it's
even shorter in terms of characters (if not keystrokes), stands out
reasonably well, and for how I read it makes for better English
grammar (eg I.send_response(...) -- I guess it depends on whether
you're doing the mental transformation of method call to message
passing).

I stopped doing this when I started (a) maintaining other people's
Python code, and having them maintain mine and (b) using editors
whose Python syntax highlighting coloured "self" as special.
"Readability counts" wins over a couple of extra characters.

-- 
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to