标签:iss 面向 style print pass log 检查 foo sub
一.isinstance(obj,cls)和issubclass(sub,super)
isinstance(obj,cls)检查obj是否是类cls的对象
class Foo(object): pass obj = Foo() print(isinstance(obj,Foo)) # True
标签:iss 面向 style print pass log 检查 foo sub
原文地址:http://www.cnblogs.com/YingLai/p/6219032.html