typing.TypeVar
型変数
code:宣言する例.py
T = TypeVar('T') # Can be anything
S = TypeVar('S', bound=str) # Can be any subtype of str
A = TypeVar('A', str, bytes) # Must be exactly str or bytes
Type variables exist primarily for the benefit of static type checkers.
They serve as the parameters for generic types as well as for generic function definitions