摘要: 单例模式class MySingleton: __obj = None __init_flag = True def __new__(cls, *args, **kwargs): if not cls.__obj: cls.__obj = super().__new__(cls) return cls.__obj ... 阅读全文
posted @ 2019-06-24 11:40 飞蝎儿 阅读(99) 评论(0) 推荐(0) 编辑