ComprehensionScope¶
- class astroid.nodes.ComprehensionScope(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
LocalsDictNodeNG
Scoping for different types of comprehensions.
- generators: list[nodes.Comprehension]¶
The generators that are looped through.
- scope_lookup(node: _base_nodes.LookupMixIn, name: str, offset: int = 0) tuple[LocalsDictNodeNG, list[nodes.NodeNG]] ¶
XXX method for interfacing the scope lookup