# You can check for class
# inheritance relationships
# with the "issubclass()" built-in:
>>> class BaseClass: pass
>>> class SubClass(BaseClass): pass
>>> issubclass(SubClass, BaseClass)
True
>>> issubclass(SubClass, object)
True
>>> issubclass(BaseClass, SubClass)
False
版权归属:
admin
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区