3 ms·
Unit tests. You only need to validate things once typically. Why force the user to run validation code over and over on a code base unlikely to change?
by bb88 5y ago
Unit tests.
You only need to validate things once typically. Why force the user to run validation code over and over on a code base unlikely to change?
- zbentley 5y agoOh, fair enough. I had misread the GP comment as being about __init__ (constructor methods) rather than __init__.py, package re-export. I'd make a small and mostly pedantic exception to "nothing but re-exports in __init__.py" for cases where you have a module with data (non-Python) files adjacent to the code, but which doesn't need more than one Python file to define its module logic. No point to have a tiny __init__.py that re-exports from an adjacent somemodule.py in that case. But generally yes, you're right.