class documentation
class ComprehensionScope(LocalsDictNodeNG): (source)
Known subclasses: astroid.nodes.scoped_nodes.DictComp, astroid.nodes.scoped_nodes.GeneratorExp, astroid.nodes.scoped_nodes.ListComp, astroid.nodes.scoped_nodes.SetComp
Scoping for different types of comprehensions.
Inherited from LocalsDictNodeNG:
| Method | __contains__ |
Check if a local is defined in this scope. |
| Method | __getitem__ |
The first node the defines the given local. |
| Method | __iter__ |
Iterate over the names of locals defined in this scoped node. |
| Method | add |
Append a child that should alter the locals of this scope node. |
| Method | items |
Get the names of the locals and the node that defines the local. |
| Method | keys |
The names of locals defined in this scoped node. |
| Method | qname |
Get the 'qualified' name of the node. |
| Method | scope |
The first parent node defining a new scope. |
| Method | set |
Define that the given name is declared in the given statement node. |
| Method | values |
The nodes that define the locals in this scoped node. |
| Class Variable | locals |
A map of the name of a local variable to the node defining the local. |
| Method | _append |
append a child, linking it in the tree |
| Method | _scope |
XXX method for interfacing the scope lookup |
Inherited from LookupMixIn (via LocalsDictNodeNG):
| Method | ilookup |
Lookup the inferred values of the given variable. |
| Method | lookup |
Lookup where the given variable is assigned. |