-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38469: Handle named expression scope whith global/nonlocal keywords #16755
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
Conversation
5db3b99
to
319b38d
Compare
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.
Did you force-push anything? GitHub told me to refresh the PR but there was no new commit.
Also, alas, I don't feel comfortable approving this, I don't know the symtable code well enough any more. Sorry!
Yeah, I force pushed a version just some minutes ago. Sorry for the confusion. |
Not a problem, thanks for the review! :) |
There should be existing test cases for this, so the question is "What's wrong with them"? The testing style in the module is also to rely on exec(), rather than on the test module itself (otherwise a compile error will keep the entire test file from running) |
Sorry, I retract that "exec" comment - it only applies to the tests that are explicitly checking for compilation errors |
And the missing test case is also genuinely missing rather than existing in a flawed form (the global declaration test doesn't use a comprehension, the comprehension tests don't use a global) |
Misc/NEWS.d/next/Core and Builtins/2019-10-13-23-41-38.bpo-38469.9kmuQj.rst
Outdated
Show resolved
Hide resolved
…69.9kmuQj.rst Co-Authored-By: Nick Coghlan <[email protected]>
Thanks @ncoghlan for the thorough review! |
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
pythonGH-16755) The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions. (cherry picked from commit fd5c414) Co-authored-by: Pablo Galindo <[email protected]>
GH-16760 is a backport of this pull request to the 3.8 branch. |
GH-16755) (#16760) The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions. (cherry picked from commit fd5c414) Co-authored-by: Pablo Galindo <[email protected]>
pythonGH-16755) The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions.
pythonGH-16755) The symbol table handing of PEP572's assignment expressions is not resolving correctly the scope of some variables in presence of global/nonlocal keywords in conjunction with comprehensions.
https://bugs.python.org/issue38469