class documentation
Expand to Cartesian product of parameter types. For example, this transforms def f(x: Union[int, float], y: Union[int, float]) -> Union[str, unicode] to def f(x: int, y: int) -> Union[str, unicode] def f(x: int, y: float) -> Union[str, unicode] def f(x: float, y: int) -> Union[str, unicode] def f(x: float, y: float) -> Union[str, unicode] The expansion by this class is typically *not* an optimization. But it can be the precursor for optimizations that need the expanded signatures, and it can simplify code generation, e.g. when generating type declarations for a type inferencer.
Method |
|
Rebuild the function with the new signatures. |
Inherited from Visitor
:
Method | __init__ |
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Method |
|
Undocumented |
Class Variable | old |
Undocumented |
Class Variable | unchecked |
Undocumented |
Class Variable | visits |
Undocumented |
Instance Variable | enter |
Undocumented |
Instance Variable | leave |
Undocumented |
Instance Variable | visit |
Undocumented |
Instance Variable | visit |
Undocumented |
Class Variable | _visitor |
Undocumented |