Skip to content
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

STY: avoid import * pattern #13942

Closed
jbrockmendel opened this issue Jul 8, 2019 · 3 comments
Closed

STY: avoid import * pattern #13942

jbrockmendel opened this issue Jul 8, 2019 · 3 comments

Comments

@jbrockmendel
Copy link
Contributor

Moving away from it would be a PITA since it is used a bunch, but this pattern makes it difficult for newcomers to see where things are defined.

@eric-wieser
Copy link
Member

The new practice from @shoyer of overriding __module__ = "numpy" makes finding things even harder.

I find that with a mildly smart editor that is aware of function definitions, the problem you describe doesn't affect me much.

I'm not sure the effects of such a change are a net positive effect on maintainability, let alone if they're worth the transition cost.

@rgommers
Copy link
Member

rgommers commented Jul 9, 2019

There's two things here:

  1. import * by end users - if this is in our docs anywhere, we should fix it
  2. import * internally in NumPy; this isn't really an issue. Even ?? in IPython will tell you exactly where things are defined. And locating things defined in C is way harder anyway.

@jbrockmendel
Copy link
Contributor Author

closing as duplicate of #13525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants