Irit Katriel added the comment:
Nesting argument groups and mutually exclusive groups is now deprecated (see
issue22047). Thank you for the bug report.
--
nosy: +iritkatriel
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Deprecate unsupported
paul j3 added the comment:
https://bugs.python.org/issue29553
Argparser does not display closing parentheses in nested mutex groups
supposedly fixed the parentheses for nested groups. You can read its
discussion and patches to see why it does not handle your case.
I don't see any examples
paul j3 added the comment:
There was a bug/issue that addressed problems with nested
mutually_exclusive_groups. It should be easy to find.
The problem is that the usage formatter is brittle, building a string and then
striping out "unnecessary" characters. I assume the fix handled the
New submission from andrew cooke :
The code below, when invoked with -h, prints:
(.env) [andrew@localhost py]$ python -m tests_sa.argparse_bug -h
usage: argparse_bug.py [-h] (-a A | [-b B | -c C)]
options:
-h, --help show this help message and exit
-a A
-b B
-c C
where the final two