From: Doug L. <lan...@go...> - 2002-02-28 20:54:51
|
>... wondering why it seems that every variable used has to >have self prefixed to it. Global and local variables do not require the "self." prefix; it is only members -- aka instance variables -- and methods that require this. >I'd just like to know why this is needed or if im doing something wrong. Or both! (Your error is not capitalizing the "I" and omitting the apostrophe. Mine is in pointing that out. You're welcome...) See http://www.python.org/doc/Humor.html#zen ... the second item says Explicit is better than implicit. That's the guiding principle for why this part of the language was designed this way. channeling-the-Tim-bot-channeling-Guido-ly, -- Doug |