paul j3 <[email protected]> added the comment:
The mutually exclusive arguments are displayed with in the argument group, at
least in my testing. From a copy-n-paste of your example:
In [8]: parser.print_help()
usage: ipython3 [-h]
[--from-args FROM_ARGS | --from-files FROM_FILES | --from-stdin
FROM_STDIN]
[-0 0]
optional arguments:
-h, --help show this help message and exit
INPUT OPTIONS:
--from-args FROM_ARGS
--from-files FROM_FILES
--from-stdin FROM_STDIN
-0 0 null delimited pathnames
I've had occasion to note that this is the only kind of group nesting that
works (or makes sense).
In add_container_actions, there is a comment:
# add container's mutually exclusive groups
# NOTE: if add_mutually_exclusive_group ever gains title= and
# description= then this code will need to be expanded as above
So the original developer envisioned giving a mutually exclusive group a
formatting role, but with this nesting this isn't needed (that I can tell).
But I don't think this has been documented.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43259>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com