Namespaces and Scope in Python

This tutorial covers Python namespaces, the structures used to organize the symbolic names assigned to objects in a Python program.
The previous tutorials in this series have emphasized the importance of objects in Python. Objects are everywhere! Virtually everything that your Python program creates or acts on is an object.
An assignment statement creates a symbolic name that you can use to reference an object. The statement x = ‘foo’ creates a symbolic name x that refers to the string object ‘foo’.
In a program of any complexity, you’ll create hundreds or thousands of such names, each pointing to a specific object. How

Continue reading the original article