Exemplo n.º 1
0
 def __setattr__(self, name, value):    
     if name in self.__dict__:
         self.__dict__[name] = value
     elif name in db_Task.properties():
         setattr(self._task, name, value)
     else:
         setattr(self._thing, name, value)    
Exemplo n.º 2
0
 def __getattr__(self, name):
     if name in db_Task.properties():
         return getattr(self._task, name)
     else:
         res =  getattr(self._thing, name)
         if not res and name in TASK_THINGS_DEFAULT:
             return TASK_THINGS_DEFAULT[name]
         return res