Python设计模式-单例模式

Python设计模式-单例模式 基于Python3.5.2,代码以下 #coding:utf-8 import threading import time class Singleton(object): def __new__(cls, *args, **kwargs): if not hasattr(cls,'_instance'): prin
相关文章
相关标签/搜索