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
Wrong error message during import #71031
Comments
Error message was supposedly copy-pasted without change. |
LGTM. But while we are here, it would be nice to replace type(path) with type(path).__name__ (and the same for type(name)). |
Should we use __qualname__ instead of __name__? And I haven't forgotten about your patch, Lev. I'm just occupied trying to get feature changes into Python 3.6 as that has a sooner deadline than bug fixes. |
Nevermind. It's not urgent but should definitely be fixed some day. |
__qualname__ itself is not much more informative than __name__. You should use it together with __module__ to get the full qualified name. But 1) it is never used in error messages, 2) the code becomes more verbose, 3) the output becomes more verbose, and excessive verbose for builtin types. __name__ LGTM. It is enough to identify the error. |
New changeset 22eaf6158e7b by Brett Cannon in branch '3.5': New changeset 46da639f7114 by Brett Cannon in branch 'default': |
Thanks for the patch, Lev! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: