Type.match#
- Type.match(other)#
Return match penalty when other can be converted to self. Otherwise, return None.
- Parameters
other ({Type, tuple}) – Specify other signature. If other is a tuple of signatures, then it is interpreted as argument types of a function signature.
- Returns
penalty – Penalty of a match. For a perfect match, penalty is 0. If match is impossible, return None
- Return type
{int, None}