module documentation

Utilities for mapping between actual and formal arguments (and their types).

Class ArgTypeExpander Utility class for mapping actual argument types to formal arguments.
Function map_actuals_to_formals Calculate mapping between actual (caller) args and formals.
Function map_formals_to_actuals Calculate the reverse mapping of map_actuals_to_formals.
def map_actuals_to_formals(actual_kinds: list[nodes.ArgKind], actual_names: Sequence[str|None]|None, formal_kinds: list[nodes.ArgKind], formal_names: Sequence[str|None], actual_arg_type: Callable[[int], Type]) -> list[list[int]]: (source)

Calculate mapping between actual (caller) args and formals. The result contains a list of caller argument indexes mapping to each callee argument index, indexed by callee index. The caller_arg_type argument should evaluate to the type of the actual argument type with the given index.

def map_formals_to_actuals(actual_kinds: list[nodes.ArgKind], actual_names: Sequence[str|None]|None, formal_kinds: list[nodes.ArgKind], formal_names: list[str|None], actual_arg_type: Callable[[int], Type]) -> list[list[int]]: (source)

Calculate the reverse mapping of map_actuals_to_formals.