[issue18943] argparse: default args in mutually exclusive groups

2017-12-08 Thread Vincas Dargis
Vincas Dargis <vin...@gmail.com> added the comment: On 2017-12-06 20:28, paul j3 wrote: > The default value is used *if the flag is not provided at all.* > > "nargs='?'" provides a third option, assigning the 'const' value *if the flag > is used without an argument

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread Vincas Dargis
Vincas Dargis <vin...@gmail.com> added the comment: On 2017-12-06 19:43, paul j3 wrote: > With one flag but not its argument, I get the error that you display. That > has nothing to do with the grouping. > > 0932:~/mypy/argdev$ python3 issue18943.py --ptz-get-status > usa

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread Vincas Dargis
Vincas Dargis <vin...@gmail.com> added the comment: Any progress with this? I believe it would fix my use case: ``` import argparse import pprint parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--device-get-capabi