3 ms·
Python uses modules to namespace functions.
by jononomo 3y ago
Python uses modules to namespace functions.
- dawnofdusk 3y agoYes but modules are very unergonomic for some of the use cases listed in the article, with their dependence on `__init__.py` and imports being wonky.
- jononomo 3y agoYou don't have to use __init__.py -- you can just create any python file and it will be a module. And I'm not sure why you think that's unergonomic. If you want a bunch of functions to share the same namespace, just put them in the same file. The name of the file becomes your module name.