def __setattr__(self, key, value):
    if (not key.startswith('_')):
        try:
            self._set_indexed_value(key, value, error_type=AttributeError)
        except AttributeError:
            pass
        else:
            self.__dict__[key] = value
            return
    object.__setattr__(self, key, value)
def __setattr__(self, key, value):
    if (not key.startswith('_')):
        try:
            self._set_indexed_value(key, value, error_type=AttributeError)
        except AttributeError:
            pass
        else:
            self.__dict__[key] = value
            return
    object.__setattr__(self, key, value)