def parse(self, argv):
if len(argv) < self.nargs:<EOL><INDENT>raise BadNumberOfArguments(self.nargs, len(argv))<EOL><DEDENT>if self.nargs == <NUM_LIT:1>:<EOL><INDENT>return self.parse_argument(argv.pop(<NUM_LIT:0>))<EOL><DEDENT>return [self.parse_argument(argv.pop(<NUM_LIT:0>)) for tmp in range(self.nargs)]<EOL>
Pop, parse and return the first self.nargs items from args.

        if self.nargs > 1 a list of parsed values will be returned.

        Raise BadNumberOfArguments or BadArgument on errors.

        NOTE: argv may be modified in place by this method.