会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
知我几分
博客园
首页
新随笔
联系
管理
订阅
2018年10月12日
Python双下划线方法和单列模式
摘要: 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)
编辑
公告