Issue 78 in argparse: add_mutually_exclusive_group more than once has incorrectly formatted help.

2 views
Skip to first unread message

argp...@googlecode.com

unread,
Jul 19, 2010, 4:46:08 PM7/19/10
to argpar...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 78 by aklaing: add_mutually_exclusive_group more than once has
incorrectly formatted help.
http://code.google.com/p/argparse/issues/detail?id=78

What steps will reproduce the problem?
1. Create two mutually exclusive groups: eg

agroup = subcmd_parser.add_mutually_exclusive_group()
agroup.add_argument('--a1', action='store_true', help='blah')
agroup.add_argument('--a2', action='store_true', help='blah')
agroup.add_argument('--a3', action='store_true', help='blah')

bgroup = subcmd_parser.add_mutually_exclusive_group()
bgroup.add_argument('--b1', action='store_true', help='blah')
bgroup.add_argument('--b2', action='store_true', help='blah')
bgroup.add_argument('--b3', action='store_true', help='blah')

What is the expected output? What do you see instead?

Expected output (on running a help command which formats help) is:
[ --a1 | --a2 | --a3 ] [ --b1 | --b2 | --b3 ]

You see instead:
[ --a1 | --a2 | --a3 [ --b1 | --b2 | --b3 ]

Note that the closing brace for the first group is missing.

What version of the product are you using? On what operating system?

1.0.1 on Windows.

Please provide any additional information below.


argp...@googlecode.com

unread,
Jul 23, 2010, 10:50:56 AM7/23/10
to argpar...@googlegroups.com
Updates:
Status: Duplicate

Comment #1 on issue 78 by steven.bethard: add_mutually_exclusive_group more

than once has incorrectly formatted help.
http://code.google.com/p/argparse/issues/detail?id=78

Moved to http://bugs.python.org/issue9355

Reply all
Reply to author
Forward
0 new messages