This commit is contained in:
yumoqing 2020-06-07 20:34:31 +08:00
parent c58babd9e7
commit 297970793e

View File

@ -28,6 +28,9 @@ class DictObject:
raise Exception('_kwargs not in __dict__') raise Exception('_kwargs not in __dict__')
return b.get(name,None) return b.get(name,None)
def __setattr__(self,name,value):
self.__setitem__(name,value)
def __getitem__(self,name): def __getitem__(self,name):
x = self.__dict__.get(name,None) x = self.__dict__.get(name,None)
if x is not None: if x is not None: