python 单例模式
摘要:
# __new__ class Demo: def __new__(cls, *args, **kwargs): if not hasattr(cls,'_instance'): cls._instance=super().__new__(cls) return cls._instance a=De 阅读全文
posted @ 2021-06-17 15:31 HHMLXL 阅读(46) 评论(0) 推荐(0)
posted @ 2021-06-17 15:31 HHMLXL 阅读(46) 评论(0) 推荐(0)