Message387283
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. |
|
Date |
User |
Action |
Args |
2021-02-19 05:54:42 | paul.j3 | set | recipients:
+ paul.j3, rhettinger, calestyo |
2021-02-19 05:54:42 | paul.j3 | set | messageid: <1613714082.26.0.861889426909.issue43259@roundup.psfhosted.org> |
2021-02-19 05:54:42 | paul.j3 | link | issue43259 messages |
2021-02-19 05:54:41 | paul.j3 | create | |
|