摘要:
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 阅读全文
摘要:
class Singleton(object): def __new__(cls, *args, **kwargs): if not hasattr(cls, '_instance'): cls._instance = super(Singleton, cls).__new__(cls) retu 阅读全文