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 |
|
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