class A(object): pass obj = A() isinstance(obj, A)#检查obj对象是否是A类的对象
class A(object): pass class B(A): pass issubclass(B, A)#检查B类是否,是A类的子类