Too many 'self' in python.That's a big flaw in this language.

Sion Arrowsmith siona at
Wed Jun 27 15:50:03 CEST 2007

Neil Cerutti  <horpner at> wrote:
>On 2007-06-27, hide1713 at <hide1713 at> wrote:
>> From My point,I think this only help python interpreter to
>> deside where to look for. Is there anyone know's how to make
>> the interpreter find instance name space first? Or any way to
>> make programmer's life easier?
>Try thinking of "self." as a notation that provides vital
>information to you, the programmer.

And it provides even more vital information to *other* programmers
dealing with your code ("other" including "you in six months time").
I've just confused the socks off a cow-orker by writing in a C++
method kill(SIGTERM); -- confusion which would have been avoided if
I'd used an explicit this->kill(SIGTERM); . But amongst C++'s many
flaws, such disambiguation is frowned on as non-idiomatic. Explicit
self *is a good thing*.

\S -- siona at --
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

More information about the Python-list mailing list