class documentation

Represents a class declaration. Used as dict/set key, so all components must be hashable. Attributes: name: Class name (string) bases: The super classes of this class (instances of pytd.Type). methods: Tuple of methods, classmethods, staticmethods (instances of pytd.Function). constants: Tuple of constant class attributes (instances of pytd.Constant). classes: Tuple of nested classes. slots: A.k.a. __slots__, declaring which instance attributes are writable. template: Tuple of pytd.TemplateItem instances.

Method __contains__ Undocumented
Method Get Version of Lookup that returns None instead of raising.
Method Lookup Convenience function: Look up a given name in the class namespace.
Class Variable bases Undocumented
Class Variable classes Undocumented
Class Variable constants Undocumented
Class Variable decorators Undocumented
Class Variable metaclass Undocumented
Class Variable methods Undocumented
Class Variable name Undocumented
Class Variable slots Undocumented
Class Variable template Undocumented
Method _InitCache Undocumented

Inherited from Node:

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 __contains__(self, name): (source)

Undocumented

def Get(self, name): (source)

Version of Lookup that returns None instead of raising.

def Lookup(self, name): (source)

Convenience function: Look up a given name in the class namespace. Tries to find a method or constant by this name in the class. Args: name: Name to look up. Returns: A Constant or Function instance. Raises: KeyError: if this identifier doesn't exist in this class.

Undocumented

classes: Tuple[Class, ...] = (source)

Undocumented

constants: Tuple[Constant, ...] = (source)

Undocumented

decorators: Tuple[Alias, ...] = (source)

Undocumented

Undocumented

methods: Tuple[Function, ...] = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _InitCache(self): (source)

Undocumented