@classmethod<EOL><INDENT>def _list_select(cls, lst, prompt, offset=<NUM_LIT:0>):<DEDENT>
inp = input("<STR_LIT>" % prompt)<EOL>assert inp, "<STR_LIT>"<EOL>try:<EOL><INDENT>return lst[int(inp)+offset]<EOL><DEDENT>except ValueError:<EOL><INDENT>return inp<EOL><DEDENT>except IndexError:<EOL><INDENT>assert False, "<STR_LIT>"<EOL><DEDENT>
Given a list of values and names, accepts the index value or name.