def get_set(self, flag, new):
        """
        Return the boolean value of 'flag'. If 'new' is set,
        the flag is updated, and the value before update is
        returned.
        """
        old = self._is_set(flag)
        if new is True:
            self._set(flag)
        elif new is False:
            self._clear(flag)
        return old
def get_set ( self , flag , new ) : old = self . _is_set ( flag ) if new is True : self . _set ( flag ) elif new is False : self . _clear ( flag ) return old
Return the boolean value of 'flag'. If 'new' is set,
        the flag is updated, and the value before update is
        returned.