the annoying, verbose self

hdante at gmail.com hdante at gmail.com
Sat Nov 24 01:56:24 CET 2007


 Hi,

 Python uses "self" (and textual notation when possible) because its
designers consider that symbols reduce readability. Self won't go
away. :-P

 The issue is related to the first and seventh lines in The Zen of
Python,

 1. "Beautiful is better than ugly"
 7. "Readability counts."

 My opinion is that "self" is a minor issue in python that we can all
live with.

On Nov 21, 9:51 pm, braver <delivera... at gmail.com> wrote:
> Is there any trick to get rid of having to type the annoying,
> character-eating "self." prefix everywhere in a class?  Sometimes I
> avoid OO just not to deal with its verbosity.  In fact, I try to use
> Ruby anywhere speed is not crucial especially for @ prefix is better-
> looking than self.
>
> But things grow -- is there any metaprogramming tricks or whatnot we
> can throw on the self?
>
> Cheers,
> Alexy




More information about the Python-list mailing list