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
clean: top-level __init__.py #7
Comments
Me: I'm working on a python library that covers a few different kinds of functions and I have arranged them in several submodules. What are the pros and cons of importing every function in every submodule into init.py at the top-most level? What is the best practice? Please provide references where possible. ChatGPT: Importing all functions in every submodule into Pros
Cons
Best Practices Deciding whether to import everything in
Remember that these are guidelines, not strict rules, and the best choice depends on the specific use case, library size, and complexity. |
Just re-read PEP 8 for the first time in a long time and while there's much I agree with, I'm surprised how much I disagree with. I should probably write a post about it. |
I only want the most-used classes and functions at the top-most level. Everything else can be accessed more directly, if needed, but I don't want to pollute the namespace.
The text was updated successfully, but these errors were encountered: