

def choice(self, question, choices, default=None, attempts=None, multiple=False):
    '\n        Give the user a single choice from an list of answers.\n\n        :param question: The question to ask\n        :type question: str\n\n        :param choices: The available choices\n        :type choices: list\n\n        :param default: The default value\n        :type default: str or None\n\n        :param attempts: The max number of attempts\n        :type attempts: int\n\n        :param multiple: Multiselect\n        :type multiple: int\n\n        :rtype: str\n        '
    question = ChoiceQuestion(question, choices, default)
    question.max_attempts = attempts
    question.multiselect = multiple
    return self.output.ask_question(question)

dataset/ETHPy150Open sdispater/cleo/cleo/commands/command.py Command.choice/original