GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — gh-98931: Improve error message when the user types 'import x from y' instead of 'from y import x' by pablogsal · Pull Request #98932 · python/cpython Conversation
|
| RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use double starred expression here") } | ||
| invalid_import: | ||
| | a='import' dotted_name 'from' dotted_name { | ||
| RAISE_SYNTAX_ERROR_STARTING_FROM(a, "Did you meant to use 'from ... import ...' instead?") } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto in tests and docs.
| RAISE_SYNTAX_ERROR_STARTING_FROM(a, "Did you meant to use 'from ... import ...' instead?") } | |
| RAISE_SYNTAX_ERROR_STARTING_FROM(a, "Did you mean to use 'from ... import ...' instead?") } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks for the review :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Of course! I think you missed the one in whatsnew?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ort x from y' instead of 'from y import x'
…es 'import x from y' instead of 'from y import x'
|
Will fix the doctest tomorrow |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Charlie Zhao <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Go!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🚀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Improve syntax error for invalid imports
There was an error while loading. Please reload this page.