Namespace
Page content
- It is a collection of names along with the information of the object it refers to.
- It maps names to the objects.
Types
1. Built-in
- It holds all the keywords or built-in names.
- It is created when the interpreter starts.
2. Global
-
It holds all the global objects.
-
It exists during the execution.
-
global <variable>
converts a local variable into a global one.
3. Local
- It exists for some part of the execution.
- It stores the names of those objects in a function.