摘要: isinstance(obj, cls)方法判断obj是否是cls的对象 issubclass(sub, super)判断sub类是否是super类的派生类或子类 可以调用类的私有属性 class Foo(object): def __init__(self,name,age): self.name 阅读全文
posted @ 2018-10-12 20:34 知你几分 阅读(316) 评论(0) 推荐(0) 编辑