[issue9625] argparse: Problem with defaults for variable nargs when using choices
Martin Pengelly-Phillips added the comment: The real issue is that the choices flag does not work with a default flag and * nargs. The following works as expected: >>> parser.add_argument('chosen', nargs='*', default=['a']) >>> print(parser
[issue9625] argparse: Problem with defaults for variable nargs
New submission from Martin Pengelly-Phillips : Variable argument count plays badly with choices. Example: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('choices', nargs='*', default='a