mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Provisional implementation of PEP 3104.
Add nonlocal_stmt to Grammar and Nonlocal node to AST. They both parallel the definitions for globals. The symbol table treats variables declared as nonlocal just like variables that are free implicitly. This change is missing the language spec changes, but makes some decisions about what the spec should say via the unittests. The PEP is silent on a number of decisions, so we should review those before claiming that nonlocal is complete. Thomas Wouters made the grammer and ast changes. Jeremy Hylton added the symbol table changes and the tests. Pete Shinners and Neal Norwitz helped review the code.
This commit is contained in:
parent
8b41c3dc28
commit
81e9502df6
12 changed files with 1188 additions and 922 deletions
1714
Python/graminit.c
1714
Python/graminit.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue