AI engineering glossary · Python core
What is namespace?
Namespace: A mapping from names to objects, such as the built-ins, a module's globals or a function's locals. Different namespaces let the same name exist in separate places without clashing. Namespaces are how Python keeps names from different modules and functions from colliding with each other.
Namespace: an example
math.pi and my_module.pi are different names in different namespaces, so they do not conflict.
Related terms
More Python core terms
- Negative indexing
- None
- Operator
- Operator precedence
- pass
- Pass by object reference
- PEP 8
- Positional argument
Where you learn it
Namespace is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.