

def activate_next(self, cli, _previous=False):
    '\n        Activate next value.\n        '
    current = self.get_current_value(cli)
    options = sorted(self.values.keys())
    try:
        index = options.index(current)
    except ValueError:
        index = 0
    if _previous:
        index -= 1
    else:
        index += 1
    next_option = options[(index % len(options))]
    self.values[_previous](cli)

dataset/ETHPy150Open jonathanslenders/ptpython/ptpython/python_input.py Option.activate_next/VarMisuse@101/125 `next_option`->`_previous`