def __setattr__(self, attr, value):
        try:
            if attr[0] == '_':
                super(BreadStruct, self).__setattr__(attr, value)
            elif attr in self._fields:
                field = self._fields[attr]
                field.set(value)
            else:
                for conditional_field in self._conditional_fields:
                    try:
                        return setattr(conditional_field, attr, value)
                    except __HOLE__:
                        pass

                raise AttributeError("No known field '%s'" % (attr))
        except CreationError as e:
            raise ValueError('Error while setting %s: %s' % (field._name, e))
dataset/ETHPy150Open alexras/bread/bread/struct.py/BreadStruct.__setattr__