def _has_base_method(meth, cls):
meth0 = _actualfunc(meth)
for cls1 in mro(cls)[1:]:
if hasattr(cls1, meth0.__name__):
fmeth = getattr(cls1, meth0.__name__)
if inspect.isfunction(fmeth) or inspect.ismethod(fmeth) \
or inspect.ismethoddescriptor(fmeth):
return True
return False
评论列表
文章目录