Esempio n. 1
0
 def __setattr__(self, name, value):
     #Make sure attribute is not read-only
     if name in self.__class__._readOnlyAttrs:
         raise NoModificationAllowedErr()
     #If it's computed execute that function
     attrFunc = self.__class__._writeComputedAttrs.get(name)
     if attrFunc:
         attrFunc(self, value)
     #Otherwise, just set the attribute
     else:
         self.__dict__[name] = value
Esempio n. 2
0
 def __setattr__(self, name, value):
     if name in ['root', 'filter', 'expandEntityReferences', 'whatToShow']:
         raise NoModificationAllowedErr()
     self.__dict__[name] = value
Esempio n. 3
0
 def __setattr__(self, name, value):
     if name == 'length':
         raise NoModificationAllowedErr()
     #Pass-through
     self.__dict__[name] = value
Esempio n. 4
0
 def _set_length(self, value):
     raise NoModificationAllowedErr()