packaging.python.org
packaging.python.org copied to clipboard
Update packaging-projects.rst: rephrase first explanation of __init__.py
I thought the explanation of init.py was kind of confusing, so I have improved it somewhat.
📚 Documentation preview 📚: https://python-packaging-user-guide--1538.org.readthedocs.build/en/1538/
To be honest, that is still a weak reasoning[^1].
[^1]: The original text had weak reasoning. This is not a problem this PR is introducing. In that respect things are more or less the same.
Users can import a directory even if it does not have an __init__.py
. Sure, it will not be a "regular" package, it will be a "namespace" package, but the text does not explain what is so great about regular packages and why they are recommended over namespaces.
This is true.
On the other hand, I guess most users do want a regular package, and if so then there's some virtue in glossing over the exceptions in this very early guide. (There is at least a footnote to explain what is being glossed over.)