const char *ste_scope_info;
int ste_nested; /* true if block is nested */
- unsigned ste_free : 1; /* true if block has free variables */
- unsigned ste_child_free : 1; /* true if a child block has free vars,
- including free refs to globals */
unsigned ste_generator : 1; /* true if namespace is a generator */
unsigned ste_coroutine : 1; /* true if namespace is a coroutine */
unsigned ste_annotations_used : 1; /* true if there are any annotations in this scope */
ste->ste_scope_info = NULL;
ste->ste_nested = 0;
- ste->ste_free = 0;
ste->ste_varargs = 0;
ste->ste_varkeywords = 0;
ste->ste_annotations_used = 0;
(st->st_cur->ste_nested ||
_PyST_IsFunctionLike(st->st_cur)))
ste->ste_nested = 1;
- ste->ste_child_free = 0;
ste->ste_generator = 0;
ste->ste_coroutine = 0;
ste->ste_comprehension = NoComprehension;
comptype,
prefix,
ste->ste_nested ? " nested" : "",
- ste->ste_free ? " free" : "",
- ste->ste_child_free ? " child_free" : "",
ste->ste_generator ? " generator" : "",
ste->ste_coroutine ? " coroutine" : "",
ste->ste_varargs ? " varargs" : "",
return error_at_directive(ste, name);
}
SET_SCOPE(scopes, name, FREE);
- ste->ste_free = 1;
return PySet_Add(free, name) >= 0;
}
if (flags & DEF_BOUND) {
}
if (contains) {
SET_SCOPE(scopes, name, FREE);
- ste->ste_free = 1;
return PySet_Add(free, name) >= 0;
}
}
return 1;
}
}
- if (ste->ste_nested)
- ste->ste_free = 1;
SET_SCOPE(scopes, name, GLOBAL_IMPLICIT);
return 1;
}
}
}
}
- comp->ste_free = PySet_Size(comp_free) > 0;
if (remove_dunder_class && PyDict_DelItemString(comp->ste_symbols, "__class__") < 0) {
return 0;
}
if (!temp)
goto error;
Py_DECREF(temp);
- /* Check if any children have free variables */
- if (entry->ste_free || entry->ste_child_free)
- ste->ste_child_free = 1;
}
/* Splice children of inlined comprehensions into our children list */