标签:not pass serve code single bsp 实现 nbsp def
def singleton(cls): instances = {} def _singleton(*args, **kw): if cls not in instances: instances[cls] = cls(*args, **kw) return instances[cls] return _singleton @singleton class Server(object): pass
标签:not pass serve code single bsp 实现 nbsp def
原文地址:https://www.cnblogs.com/wenlin-gk/p/10695265.html