def set(self, name, value):
        """
        Sets the value of the field `name` to `value`, which is `True` or
        `False`.
        """
        flag = self.flags[name]
        self._value = (self.value | flag) if value else (self.value & ~flag)