-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-40715: Reject dict unpacking on dict comprehensions #20292
Conversation
Suggestion for being consistent with things like |
@isidentical You need to rebase and regenerate the parser |
Also, if we want to be completely compatible with the old parser, the error caret should point to the opening brace:
|
I thought it should be same with single starred expressions
|
Yup, I find that kind of weird as well! |
Yeah, I think the old parser is the one should point to the |
If we've got no problem with showing to another token than the one the old parsers shows to, then no doubt, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit b8a65ec) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
GH-20303 is a backport of this pull request to the 3.9 branch. |
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
https://bugs.python.org/issue40715