def lookup_method(name, caller_type, *args):
"""Lookup method with the given name for the given type."""
if isinstance(caller_type, TupleMeta):
caller_origin = Tuple
elif isinstance(caller_type, GenericMeta):
caller_origin = _gorg(caller_type)
else:
caller_origin = caller_type
return TYPE_SIGNATURES[caller_origin][name]
评论列表
文章目录