class documentation

Base Node class.

Method __ge__ Undocumented
Method __gt__ Larger than other node? Define so we can have deterministic ordering.
Method __iter__ Undocumented
Method __le__ Undocumented
Method __lt__ Smaller than other node? Define so we can have deterministic ordering.
Method IterChildren Undocumented
Method PopulateLookupCache Undocumented
Method Replace Undocumented
Method Visit Visitor interface for transforming a tree of nodes to a new tree.
Class Variable __slots__ Undocumented
Method _ToTuple Returns a tuple of the fields of self as a sort key.
Class Variable _name2item Undocumented
def __ge__(self, other): (source)

Undocumented

def __gt__(self, other): (source)

Larger than other node? Define so we can have deterministic ordering.

def __iter__(self): (source)

Undocumented

def __le__(self, other): (source)

Undocumented

def __lt__(self, other): (source)

Smaller than other node? Define so we can have deterministic ordering.

def IterChildren(self): (source)

Undocumented

def PopulateLookupCache(self, *members): (source)

Undocumented

def Replace(self, *args, **kwargs): (source)

Undocumented

def Visit(self, visitor, *args, **kwargs): (source)

Visitor interface for transforming a tree of nodes to a new tree. You can pass a visitor, and callback functions on that visitor will be called for all nodes in the tree. Note that nodes are also allowed to be stored in lists and as the values of dictionaries, as long as these lists/dictionaries are stored in the named fields of the Node class. It's possible to overload the Visit function on Nodes, to do your own processing. Arguments: visitor: An instance of a visitor for this tree. For every node type you want to transform, this visitor implements a "Visit<Classname>" function named after the class of the node this function should target. Note that <Classname> is the *actual* class of the node, so if you subclass a Node class, visitors for the superclasses will *not* be triggered anymore. Also, visitor callbacks are only triggered for subclasses of Node. *args: Passed to the visitor callback. **kwargs: Passed to the visitor callback. Returns: Transformed version of this node.

def _ToTuple(self): (source)

Returns a tuple of the fields of self as a sort key.

_name2item: Dict[str, Any] = (source)

Undocumented