A two-namespace model for Python modules
Discussions on Python.org
A two-namespace model for Python modules
Paraphrasing the Zen of Python: Namespaces are one honking great idea – let’s add one more to every module! A module logically has an external API (the symbols users are intended to access) and an internal implementation (the symbols used to implement the module but not intended to be part of its API). But a module currently olny has a single namespace. Current approaches to distinguishing external and internal symbols are: The leading-underscore convention: distinguishing them by naming ...
0 comments
No comments yet.