You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
I think I prefer A? It makes it clearer when reading code what is being called, without having to check the imports, which might be a long way away from the code.
I don't think PEP8 covers this? (It says prefer on separate lines, prefer absolute imports where possible, and no wild card (*) imports).
The text was updated successfully, but these errors were encountered:
Is there some rules you have for when you prefer A or B?
I've just found issues with circular imports when using type B and now I think I need to go and read up more on how Python imports work, as I'm clearly missing some details!
As far as I can tell, PEP8 doesn't cover my original question. There is a section on "When importing a class from a class-containing module, ...." that touches on this, but it doesn't actually express a preference!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A)
B)
Discuss!
I think I prefer A? It makes it clearer when reading code what is being called, without having to check the imports, which might be a long way away from the code.
I don't think PEP8 covers this? (It says prefer on separate lines, prefer absolute imports where possible, and no wild card (*) imports).
The text was updated successfully, but these errors were encountered: