标签:not war bsp pre 实现 __new__ super python new
class CCP(object): def __new__(cls, *args, **kwargs): if not hasattr(cls, ‘_instance‘): cls._instance = super(CCP, cls).__new__(cls, *args, **kwargs) return cls._instance
标签:not war bsp pre 实现 __new__ super python new
原文地址:https://www.cnblogs.com/liuxuelin/p/14483561.html