-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Support __main__ #658
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
Comments
Ah yes, I stumbled into this a while ago myself. Thanks for reporting this! |
@kirbyfan64 I know it's been a while, but can you be more specific about the issue you ran into here? |
I think it was |
If you're talking about code that imports
passes without errors. |
@gvanrossum Put the The following will happen:
Interesting that |
FWIW this is because when you pass module filenames (i.e. *.py) on the command line the module name is derived from the filename. So So I'm not even sure this counts as a bug. Certainly the legit use cases for importing |
What about |
That's different, there will always be a `__main__.py` in that case and
it's not toplevel.
|
Is there a compelling use case? |
Closing as there don't seem to be compelling use cases. |
Right now, it says the module can't be found.
The text was updated successfully, but these errors were encountered: