Message111316
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
Please provide any additional information below.
This is caused by calling using the % string formatting operator without
proper wrapping of the argument. The fix is basically:
- raise ValueError('%r is not callable' % type_func)
+ raise ValueError('%r is not callable' % (type_func,)) |
|
Date |
User |
Action |
Args |
2010-07-23 13:27:50 | bethard | set | recipients:
+ bethard |
2010-07-23 13:27:50 | bethard | set | messageid: <1279891670.23.0.306869867423.issue9347@psf.upfronthosting.co.za> |
2010-07-23 13:27:11 | bethard | link | issue9347 messages |
2010-07-23 13:27:10 | bethard | create | |
|