packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

Update packaging-projects.rst: rephrase first explanation of __init__.py

Open wyattscarpenter opened this issue 9 months ago • 2 comments

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/

wyattscarpenter avatar May 03 '24 04:05 wyattscarpenter

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.

abravalheri avatar May 03 '24 06:05 abravalheri

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.)

wyattscarpenter avatar May 03 '24 06:05 wyattscarpenter