[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2019-01-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: Closing per paul.j3's last comment which also is mentioned in the documentation (https://docs.python.org/3.8/library/argparse.html#default ): > For positional arguments with nargs equal to ? or *, the default value is > used when no command-line argument

[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2019-01-18 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2013-10-14 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15613 ___ ___ Python-bugs-list mailing

[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2013-10-14 Thread paul j3
paul j3 added the comment: Looks like this behavior is intentional. This subclass adds a '%(default)s' string to the help lines if: if '%(default)' not in action.help: if action.default is not SUPPRESS: defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] if

[issue15613] argparse ArgumentDefaultsHelpFormatter interacts badly with --arg and nargs=+

2012-08-10 Thread Alex Jurkiewicz
New submission from Alex Jurkiewicz: Sample code: #!/usr/bin/env python import argparse print(\n\narg=foo, nargs=+) parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('foo', nargs='+', help='foos', default=['foo1', 'foo2'])