isinstance(obj,cls)检查是否是类cls的对象
>>> class Foo:pass
...
>>> obj1 = Foo()
>>>isinstance(obj1,Foo)
True
issubclass(sub,super)检查sub是否是super类派生类
>>> class Foo:pass
...
>>> class Bar(Foo):
... pass
...
>>> issubclass(Bar,Foo)
True
这两个方法可以作为判断使用