-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add discussion on __main__.py
vs. __init__.py
files
#1508
Comments
I've been meaning to write a blog post on the topic for years. What do you have in mind exactly? I think that packaging-wise, some |
Yes, the way you structured the |
Recently someone was importing from my package's |
I didn't really implement it but was a reviewer of the PR that added that CLI interface. I think it only implements a subset of what I now consider a good practice.
I only seen an |
Yes I agree discouraging it explicitly would make sense. |
My own preference is to have a
(the default to taking arguments from That way there's zero temptation to import from For a while I used to make my Omitting the |
This ought to be a valuable extension regarding guidance on how to structure a Python package.
There is often dissent about what to store in and when to use these files, thus presenting best practices and resolving possible misunderstandings should be the mains goals of the discussion. This was already suggested in pypa/sampleproject#67 (comment).
The text was updated successfully, but these errors were encountered: