What steps will reproduce the problem?
parser = argparse.ArgumentParser()
parser.add_argument('--foo', type=(int, float))
What is the expected output?
ValueError: (<type 'int'>, <type 'float'>) is not callable
What do you see instead?
TypeError: not all arguments converted during string formatting
What version of the product are you using?
argparse 1.1
On what operating system?
Debian Linux
Please provide any additional information below.
This is caused by calling using the % string formatting operator without
proper wrapping of the argument. The attached patch corrects this.
This was discovered by assuming that 'type' accept handle a sequence like
metavar does. It is unfortunate that it does not, but I'll raise that as a
seperate issue.
Original issue reported on code.google.com by Karatorian on 14 Mar 2010 at 1:40
Original issue reported on code.google.com by
Karatorian
on 14 Mar 2010 at 1:40Attachments: