[issue24736] argparse add_mutually_exclusive_group do not print help

paul j3 report at bugs.python.org
Mon Aug 3 19:12:44 CEST 2015


paul j3 added the comment:

These two types of groups serve different purposes and aren't designed to nest or interact.

An argument group groups arguments in the help lines.  It does not affect parsing at all.  It can't be used to add a 'group' of arguments to another group.

A mutually exclusive group produces an error message during parsing, and modifies the usage line.  There isn't a way, in the current code, to nest groups of arguments (in some sort of 'any' or 'and' sense) within a mutually exclusive group.  It's 'xor' for all arguments.

----------
nosy: +paul.j3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24736>
_______________________________________


More information about the Python-bugs-list mailing list