This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christofsteel
Recipients christofsteel
Date 2017-02-14.14:59:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za>
In-reply-to
Content
When creating nested mutually exclusive groups, all closing brackets except one are omitted.

Example:
parser = ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument('-a')
group.add_argument('-b')
group2 = group.add_mutually_exclusive_group()
group2.add_argument('-c')
group2.add_argument('-d')
group3 = group2.add_mutually_exclusive_group()
group3.add_argument('-e')
group3.add_argument('-f')

prints a usage line of:
usage: test.py [-h] [-a A | -b B | [-c C | -d D | [-e E | -f F]

it should print something like:
usage: test.py [-h] [-a A | -b B | [-c C | -d D | [-e E | -f F]]]
History
Date User Action Args
2017-02-14 14:59:53christofsteelsetrecipients: + christofsteel
2017-02-14 14:59:53christofsteelsetmessageid: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za>
2017-02-14 14:59:53christofsteellinkissue29553 messages
2017-02-14 14:59:53christofsteelcreate