global name 'self' is not defined

Fredrik Lundh fredrik at pythonware.com
Tue Dec 5 10:55:42 EST 2006


Evan wrote:

> A few questions: Why does python use the double underscore (__main__ or
> if __name__)?  I've only been using python for about 3 weeks, and I see
> this syntax a lot, but haven't found an explanation for it so far?

to quote the language reference, "System-defined names. These names are 
defined by the interpreter and its implementation (including the 
standard library)".  see:

     http://effbot.org/pyref/reserved-identifier-classes

</F>




More information about the Python-list mailing list