Code in your main Python program (and within IDLE’s shell) is associated with a namespace called
__main__. When you put your code into its own module, Python automatically creates a namespace with the same name as your module. So, the code in your module is associated with a namespace called
What do they mean by "Code in your main Python program" mean? When we have to write python code, we do that in a .py file. So, the code automatically belongs to the name space of the .py file, not the main namespace. So, where does this main name space come into picture?
Share this highlighthttp://www.safaribooksonline.com/a/head-first-python/651023/