摘要: 面向对象相关 1、判定 isinstance(obj, cls) 、issubclass(sub, super)class Father(object): pass class Son(Father): pass obj = Father() # 检查obj是否是类的对象 print isinstance(obj,Father) # 检查Son是否是父类的子类 prin... 阅读全文
posted @ 2015-12-14 17:54 YaYaTang 阅读(169) 评论(0) 推荐(0) 编辑