paul j3 added the comment:
I wonder if this patch is needed.
- there hasn't been discussion in 4 years
- In Steven's use case, a group without any arguments, the group does not show
up. A common example of an empty argument group, is a parser without any user
defined arguments.
p=argparse.ArgumentParser(prog='PROG')
p.print_help()
usage: PROG [-h]
optional arguments:
-h, --help show this help message and exit
The empty 'positional arguments' group is not displayed.
Removing a group that has arguments is more complicated (and error prone) since
it requires removing those arguments as well. There is a '_remove_action'
method. But as best I can tell it is only used by '_handle_conflict_resolve',
a rarely used alternative conflict handler.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9350>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com