判断是否 他的父类
class Foo(object): passobj = Foo()class Boo(Foo): passclass Coo(Boo): passobj = Boo()print(issubclass(Boo, Foo))print(issubclass(Boo, Coo))'''TrueFalse'''
本文共 226 字,大约阅读时间需要 1 分钟。
判断是否 他的父类
class Foo(object): passobj = Foo()class Boo(Foo): passclass Coo(Boo): passobj = Boo()print(issubclass(Boo, Foo))print(issubclass(Boo, Coo))'''TrueFalse'''
转载于:https://www.cnblogs.com/mingerlcm/p/8515760.html