摘要: 单例模式就是单个对象(单个实例) 可以看到创建了三个对象 单例模式: class Sigleton: # 私有化 __instance = None # 重写 def __new__(cls): print(" > new") if cls.__instance is None: cls.__ins 阅读全文
posted @ 2020-05-03 15:10 GumpYan 阅读(159) 评论(0) 推荐(0) 编辑