def __setitem__(self, key, value):
    self._set_indexed_value(key, value, error_type=KeyError)
    self.__dict__[key] = value
def __setitem__(self, key, value):
    self._set_indexed_value(key, value, error_type=KeyError)
    self.__dict__[key] = value