标签:single att *args instance 单例模式 log rgs obj logs
class Singleton(object): def __new__(cls, *args, **kw): if not hasattr(cls, ‘_instance‘): orig = super(Singleton, cls) cls._instance = orig.__new__(cls, *args, **kw) return cls._instance
标签:single att *args instance 单例模式 log rgs obj logs
原文地址:http://www.cnblogs.com/m2492565210/p/7231557.html