Package compiler :: Module symbols :: Class SymbolVisitor
[hide private]
[frames] | no frames]

_ClassType SymbolVisitor

Instance Methods [hide private]
 
__init__(self)
 
visitModule(self, node)
 
visitExpression(self, node)
 
visitFunction(self, node, parent)
 
visitGenExpr(self, node, parent)
 
visitGenExprInner(self, node, scope)
 
visitGenExprFor(self, node, scope)
 
visitGenExprIf(self, node, scope)
 
visitLambda(self, node, parent, assign=0)
 
_do_args(self, scope, args)
 
handle_free_vars(self, scope, parent)
 
visitClass(self, node, parent)
 
visitName(self, node, scope, assign=0)
 
visitFor(self, node, scope)
 
visitFrom(self, node, scope)
 
visitImport(self, node, scope)
 
visitGlobal(self, node, scope)
 
visitAssign(self, node, scope)
Propagate assignment flag down to child nodes.
 
visitAssName(self, node, scope, assign=1)
 
visitAssAttr(self, node, scope, assign=0)
 
visitSubscript(self, node, scope, assign=0)
 
visitSlice(self, node, scope, assign=0)
 
visitAugAssign(self, node, scope)
 
visitIf(self, node, scope)
 
visitYield(self, node, scope)
Class Variables [hide private]
  _const_types = (<type 'str'>, <type 'int'>, <type 'float'>)
Method Details [hide private]

visitAssign(self, node, scope)

 

Propagate assignment flag down to child nodes.

The Assign node doesn't itself contains the variables being assigned to. Instead, the children in node.nodes are visited with the assign flag set to true. When the names occur in those nodes, they are marked as defs.

Some names that occur in an assignment target are not bound by the assignment, e.g. a name occurring inside a slice. The visitor handles these nodes specially; they do not propagate the assign flag to their children.