def revert ( self ):
        """ Reverts all changes made so far and clears the history.
        """
        history = self.history[ : self.now ]
        self.clear()
        for i in range( len( history ) - 1, -1, -1 ):
            items = history[i]
            for j in range( 1 - len( items ), -1, -1 ):
                items[j].undo()

    #---------------------------------------------------------------------------
    #  Clears the undo history
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/undo.py/UndoHistory.revert/swapped operands of `-`