classification
Title: add remove_argument_group to argparse
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bethard
Priority: normal Keywords:

Created on 2010-07-23 13:51 by bethard, last changed 2010-07-23 13:51 by bethard.

Messages (1)
msg111321 - (view) Author: Steven Bethard (bethard) * (Python committer) Date: 2010-07-23 13:51
[From http://code.google.com/p/argparse/issues/detail?id=71]

There is a method ArgumentParser.add_argument_group() to create and add an argument group to the parser.  I would like the ability to remove an argument group via a method like remove_argument_group(group).

The use case for me is I create an argument group and then conditionally add a bunch of arguments to it.  If zero arguments are added I would like to then remove the group so that an empty group does not show up in the help output.
History
Date User Action Args
2010-07-23 13:51:26bethardcreate