class ChoiceField(prompt, choices)[source]

ChoiceField prompts the user to choose from the list of strings provided in choices. Result is stored in self.result as an index in to the choices array.

Attr str prompt

prompt to be presented to the user

Attr list(str) choices

list of choices to choose from

__init__(prompt, choices)[source]

Initialize self. See help(type(self)) for accurate signature.


__init__(prompt, choices)

Initialize self.