point errors related to nonlocals and globals to the statement declaring them (closes #10189)

This commit is contained in:
Benjamin Peterson 2012-10-31 20:26:20 -04:00
parent a889d801ed
commit d9c8702c0f
3 changed files with 53 additions and 8 deletions

View file

@ -39,6 +39,7 @@ typedef struct _symtable_entry {
PyObject *ste_name; /* string: name of current block */
PyObject *ste_varnames; /* list of function parameters */
PyObject *ste_children; /* list of child blocks */
PyObject *ste_directives;/* locations of global and nonlocal statements */
_Py_block_ty ste_type; /* module, class, or function */
int ste_unoptimized; /* false if namespace is optimized */
int ste_nested; /* true if block is nested */