The Zen of Python that you can read after writing import this in the interpreter session says the following about namespaces:
Namespaces are one honking great idea-let's do more of those!
And this can be understood in at least two ways. The first is a namespace in context of the language. We all use the following namespaces without even knowing:
- The global namespace of a module
- The local namespace of the function or method invocation
- The class namespace
The other kind of namespaces can be provided at the packaging level. These are namespace packages. This is often an overlooked feature of Python packaging that can be very useful in structuring the package ecosystem in your organization or in a very large project.