def undo(self, mark=None):

        self._check_open()
        self._check_undo_enabled()

#         print("(pre)UNDO: (curaction, curmark) = (%s,%s)" % \
#               (self._curaction, self._curmark))
        if mark is None:
            markid = self._curmark
            # Correction if we are settled on top of a mark
            opcode = self._actionlog.cols.opcode
            if opcode[self._curaction] == _op_to_code["MARK"]:
                markid -= 1
        else:
            # Get the mark ID number
            markid = self._get_mark_id(mark)
        # Get the final action ID to go
        finalaction = self._get_final_action(markid)
        if finalaction > self._curaction:
            raise UndoRedoError("Mark ``%s`` is newer than the current mark. "
                                "Use `redo()` or `goto()` instead." % (mark,))

        # The file is going to be changed.
        self._check_writable()

        # Try to reach this mark by unwinding actions in the log
        self._doundo(finalaction - 1, -1)
        if self._curaction < self._actionlog.nrows - 1:
            self._curaction += 1
        self._curmark = int(self._actionlog.cols.arg1[self._curaction])
#         print("(post)UNDO: (curaction, curmark) = (%s,%s)" % \
#               (self._curaction, self._curmark))
Return a random key from the key space
dataset/ETHPy150Open PyTables/PyTables/tables/file.py/File.undo--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/txredisapi.py/RedisProtocol.randomkey