Loading

摘要: 一、通过 __new__ 方法实现 1.示例 class A(): _instance = None def __init__(self, x) -> None: self.a = [x] def __new__(cls, *args, **kargs): if cls._instance is N 阅读全文
posted @ 2023-02-09 15:45 国家三级保护废物 阅读(22) 评论(0) 推荐(0) 编辑