diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-28 22:54:51 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-02-28 22:54:51 (GMT) |
commit | 4419ac1a97d445f3fadacbf7b25c4cfc258c733b (patch) | |
tree | ea6b906dcc88b8c32c937122772474e4cce11fbd /Doc/Makefile | |
parent | 150a6640f5f63d2dd32e823b619b6afdf3d1b8c1 (diff) | |
download | cpython-4419ac1a97d445f3fadacbf7b25c4cfc258c733b.zip cpython-4419ac1a97d445f3fadacbf7b25c4cfc258c733b.tar.gz cpython-4419ac1a97d445f3fadacbf7b25c4cfc258c733b.tar.bz2 |
Add warning/error handlin for problematic nested scopes cases as
described in PEP 227.
symtable_check_unoptimized() warns about import * and exec with "in"
when it is used in a function that contains a nested function with
free variables. Warnings are issued unless nested scopes are in
effect, in which case these are SyntaxErrors.
symtable_check_shadow() warns about assignments in a function scope
that shadow free variables defined in a nested scope. This will
always generate a warning -- and will behave differently with nested
scopes than without.
Restore full checking for free vars in children, even when nested
scopes are not enabled. This is needed to support warnings for
shadowing.
Change symtable_warn() to return an int-- the return value of
PyErr_WarnExplicit.
Sundry cleanup: Remove commented out code. Break long lines.
Diffstat (limited to 'Doc/Makefile')
0 files changed, 0 insertions, 0 deletions