-
Notifications
You must be signed in to change notification settings - Fork 187
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
pyimport syntax: from <module> import <symbol> #66
Comments
I would prefer to use the Julian syntax here (when in Rome...): |
+1 been laboring with multi-line import statements due to lack of this feature. |
I'm a little worried about namespace conflicts. If I implement @hammer, can you give a concrete example where this would be important to you? |
Obviously this is 2 years old, but maybe something has changed since then that warrants adding this? I think it'd be a great feature. I don't have concrete examples to add, just to say that obviously it would allow writing more concise easier-to-read code in many cases. As for overwriting, once I've written |
Honestly, I'm thinking of getting rid of You can still just do |
I implemented it in ScikitLearn: using ScikitLearn.Skcore: @pyimport2
@pyimport2 scipy.ndimage: (gaussian_filter, fourier_uniform) but I struggled to get the hygiene right. I can make a PR for it if there is interest.
-1 for me, that would get tiring. |
Thanks guys, yea Re: removing |
Maybe in @pyimport macros you could add some other sintaxis, for example if the user dont need to load all the package and only one function or more of it:
The text was updated successfully, but these errors were encountered: