]> granicus.if.org Git - python/commit
bpo-38469: Handle named expression scope with global/nonlocal keywords (GH-16755...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Oct 2019 11:40:15 +0000 (04:40 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Mon, 14 Oct 2019 11:40:15 +0000 (13:40 +0200)
commit927f07c816aad9f8ed961d7ace6a367837f7fa8f
tree6fdf864d74436422335c89ebdff2f3afbc66866f
parentac53ba6c7c0c43100bab8bc427d54563d9b65a0e
bpo-38469: Handle named expression scope with global/nonlocal keywords (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 fd5c414880b2e05720b9cf14ab0b0d7ae2b7d925)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Lib/test/test_named_expressions.py
Misc/NEWS.d/next/Core and Builtins/2019-10-13-23-41-38.bpo-38469.9kmuQj.rst [new file with mode: 0644]
Python/symtable.c