Message187614
This nargs test using the formater applies only when the container has a help formatter. That is true for a ArgumentParser, but not for an argument_group.
group = parser.add_argument_group('g')
group.add_argument('bar', nargs='test')
does not raise an error.
format_help will produce an error: ...
File "./argparse.py", line 585, in _format_args
formats = ['%s' for _ in range(action.nargs)]
TypeError: 'str' object cannot be interpreted as an integer
while parse_args produces the error: ...
File "./argparse.py", line 2200, in _get_nargs_pattern
nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs)
TypeError: can't multiply sequence by non-int of type 'str' |
|
Date |
User |
Action |
Args |
2013-04-23 07:16:17 | paul.j3 | set | recipients:
+ paul.j3, bethard, eric.araujo, Jason.Baker, BreamoreBoy |
2013-04-23 07:16:17 | paul.j3 | set | messageid: <1366701377.48.0.597656816502.issue9849@psf.upfronthosting.co.za> |
2013-04-23 07:16:17 | paul.j3 | link | issue9849 messages |
2013-04-23 07:16:17 | paul.j3 | create | |
|