摘要: 1 class Dog(object): 2 3 __instance = None # 设置一个变量来判断储存构造出来得例子 4 5 def __new__(cls): 6 if cls.__instance == None: 7 cls.__instance = object.__new__(cls) 8 ... 阅读全文
posted @ 2018-07-18 22:39 饭桶大叔 阅读(106) 评论(0) 推荐(0) 编辑