def cb(option, value, parser):
arguments = [value]<EOL>for arg in parser.rargs:<EOL><INDENT>if arg[<NUM_LIT:0>] != "<STR_LIT:->":<EOL><INDENT>arguments.append(arg)<EOL><DEDENT>else:<EOL><INDENT>del parser.rargs[:len(arguments)]<EOL>break<EOL><DEDENT><DEDENT>if getattr(parser.values, option.dest):<EOL><INDENT>arguments.extend(getattr(parser.values, option.dest))<EOL><DEDENT>setattr(parser.values, option.dest, arguments)<EOL>
Callback function to handle variable number of arguments in optparse