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-38469: Handle named expression scope whith global/nonlocal keywords #16755
Conversation
5db3b99
to
319b38d
Compare
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 |
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