标签:update attr highlight sel ada elf method pre apt
class Adapter:
def __init__(self,obj,adapter_method):
self.obj = obj
#add obj attr
#var = vars(obj)
#self.__dict__.update(var)
self.__dict__.update(adapter_method)
def __str__(self):
return str(self.obj)
未适配部分委托给包含在适配器中的对象(python设计模式)
标签:update attr highlight sel ada elf method pre apt
原文地址:http://www.cnblogs.com/who-a/p/6646695.html