def commit(undo, redo=(lambda : None)):
    'Commit `undo` and `redo` to history\n\n    Arguments:\n        undo (func): Call this function on next undo\n        redo (func, optional): Like `undo`, for for redo\n\n    '
    if (not ENABLE_UNDO):
        return
    if (not hasattr(cmds, command)):
        install()
    try:
        assert (shared.redo is None)
        assert (shared.undo is None)
    except AssertionError:
        log.debug(('%s has a problem with undo' % __name__))
    shared.undo = ('%x' % id(undo))
    shared.redo = ('%x' % id(redo))
    shared.undos[shared.undo] = undo
    shared.redos[shared.redo] = redo
    getattr(cmds, command)()
Commit `undo` and `redo` to history

Arguments:
    undo (func): Call this function on next undo
    redo (func, optional): Like `undo`, for for redo
def commit(undo, redo=(lambda : None)):
    'Commit `undo` and `redo` to history\n\n    Arguments:\n        undo (func): Call this function on next undo\n        redo (func, optional): Like `undo`, for for redo\n\n    '
    if (not ENABLE_UNDO):
        return
    if (not hasattr(cmds, command)):
        install()
    try:
        assert (shared.redo is None)
        assert (shared.undo is None)
    except AssertionError:
        log.debug(('%s has a problem with undo' % __name__))
    shared.undo = ('%x' % id(undo))
    shared.redo = ('%x' % id(redo))
    shared.undos[shared.undo] = undo
    shared.redos[shared.redo] = redo
    getattr(cmds, command)()