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)
def __delattr__(self, name): self._p_note_change() _delattribute(self, name)