Wrappers for ast.Name nodes.
- class pycc.astwrappers.name.Name(node)¶
Wrapper for an ast.Name node for ease of use.
Get an iterable of all assignments to a name.
The scoping rules for this method are identical to that which produces an iterable of name uses.
True if name is assigned to only once within its lexical scope.
Get the first declaration of the Name.
Get the raw ast.Name node.
Get the asttools.name.NAME_SOURCE of the Name.
Get the string which represents the Name.
Get an iterable of all uses of the name.
If the source is asttools.name.NAME_SOURCE.BUILTIN this iterable will contain all uses of the name in the module. Otherwise only uses within the lexical scope of the declaration are contained within the iterable.
Wrappers for AST nodes.