def _get_name_from_func(func, other):
if not isinstance(func, types.LambdaType):
with contextlib.suppress(AttributeError):
return func.__qualname__
with contextlib.suppress(AttributeError):
return func.__name__
return other
评论列表
文章目录