2023年7月30日
摘要: class A: def cost(self): print('cost a')​​class B: def cost(self): print('cost b')​​class MyAdapter:​ def __init__(self, obj): self.obj = obj​ def pay 阅读全文
posted @ 2023-07-30 13:01 CJTARRR 阅读(5) 评论(0) 推荐(0) 编辑
摘要: class Singleton(object):​ def __new__(cls, *args, **kwargs): if not hasattr(cls, '_instance'): cls._instance = super(Singleton, cls).__new__(cls) retu 阅读全文
posted @ 2023-07-30 10:39 CJTARRR 阅读(4) 评论(0) 推荐(0) 编辑