[issue9350] add remove_argument_group to argparse

Steven Bethard report at bugs.python.org
Fri Jul 23 15:51:28 CEST 2010

New submission from Steven Bethard <steven.bethard at gmail.com>:

[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.

components: Library (Lib)
messages: 111321
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: add remove_argument_group to argparse
type: feature request

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list