def get_editor(self):
        if self.editor is not None:
            return self.editor
        for key in 'VISUAL', 'EDITOR':
            rv = os.environ.get(key)
            if rv:
                return rv
        if WIN:
            return 'notepad'
        for editor in 'vim', 'nano':
            if os.system(editor % 'which %s >/dev/null 2>&1') == 0:
                return editor
        return 'vi'
dataset/ETHPy150Open pallets/click/click/_termui_impl.py/Editor.get_editor/swapped operands of `%`