Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Importing and namespace visibility
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="bruno modulix, post: 1820006"] the '__main__' program is in fact just another Python module. What makes it the 'main program' is the fact that you pass it to the Python interpreter as a 'main program'. from within this particular module only. Take care, this has other implications too. (snip) This is not. Right. And that's a Good Thing(tm). The term 'global' in Python is somewhat misleading. What it really means is "global to the current module". Each module (and remember the 'main program' is a module too) has it's own namespace. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Importing and namespace visibility
Top