@staticmethod<EOL><INDENT>def parse(s):<DEDENT>
if isinstance(s, arg_type):<EOL><INDENT>return s<EOL><DEDENT>if isinstance(s, (list, tuple)):<EOL><INDENT>for arg in arg_type:<EOL><INDENT>if [s[<NUM_LIT:0>], s[-<NUM_LIT:1>]] == arg.delims():<EOL><INDENT>return arg(*s[<NUM_LIT:1>:-<NUM_LIT:1>])<EOL><DEDENT><DEDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (str(s)))<EOL><DEDENT>for arg in arg_type:<EOL><INDENT>if arg.__is__(s):<EOL><INDENT>return arg(arg.__strip__(s))<EOL><DEDENT><DEDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>
Parse a string or list and return an Argument object

        :param Union[str,iterable] s: Either a string or a list, where the first and
            last elements are valid argument delimiters.

        >>> Arg.parse(RArg('arg0'))
        RArg('arg0')
        >>> Arg.parse('[arg0]')
        OArg('arg0')