mrpro.operators.EndomorphOperator.TypeVarTuple

class mrpro.operators.EndomorphOperator.TypeVarTuple(name)[source]

Bases: _Final, _Immutable, _PickleUsingNameMixin

Type variable tuple.

Usage:

Ts = TypeVarTuple(‘Ts’) # Can be given any name

Just as a TypeVar (type variable) is a placeholder for a single type, a TypeVarTuple is a placeholder for an arbitrary number of types. For example, if we define a generic class using a TypeVarTuple:

class C(Generic[*Ts]): …

Then we can parameterize that class with an arbitrary number of type :param C[int] # Fine: :param C[int: :param str] # Also fine: :param C[()] # Even this is fine:

For more details, see PEP 646.

Note that only TypeVarTuples defined in global scope can be pickled.

__init__(name)[source]

Methods

__init__(name)