Пример #1
0
 def __setstate__(self, state):
     if _hasattribute(self, '__dict__'):
         _getattribute(self, '__dict__').clear()
     for name in self._p_gen_data_slots():
         _delattribute(self, name)
     if state is not None:
         for key, value in iteritems(state):
             _setattribute(self, key, value)
Пример #2
0
 def __delattr__(self, name):
     self._p_note_change()
     _delattribute(self, name)