use of "self", was "No Do while/repeat until looping construct in python?"

Mel Wilson mwilson at the-wire.com
Sat Mar 15 09:07:58 EST 2003


In article <pan.2003.03.15.03.25.43.800281 at attglobal.net>,
"William Sonna" <wsonna at attglobal.net> wrote:
>What I am sick of is getting nailed by the interpreter for forgetting to
>add "self" to every lousy instance variable name - or even worse - having
>it treat my omission as a local variable.  The mandatory self is itself a
>source of errors, and I believe based on my own experience that it creates
>more errors than it prevents.
>
>Call it a feature if you will, but my guess is that its an implementation
>requirement that has a side benefit for those who like mandatory
>qualification.

   You choose between mandatory declaration, like in Java,
or mandatory qualification, like in Python.

   Quite simply, without previous declaraion there is no
way the language can say that what you have done is a
mistake.

        Regards.        Mel.




More information about the Python-list mailing list