bpo-38469: Handle named expression scope whith global/nonlocal keywords#16755
bpo-38469: Handle named expression scope whith global/nonlocal keywords#16755pablogsal merged 4 commits intopython:masterfrom
Conversation
5db3b99 to
319b38d
Compare
gvanrossum
left a comment
There was a problem hiding this comment.
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 <ncoghlan@gmail.com>
|
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 <Pablogsal@gmail.com>
|
GH-16760 is a backport of this pull request to the 3.8 branch. |
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