New submission from Steven Bethard <steven.beth...@gmail.com>:

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

----------
components: Library (Lib)
messages: 111335
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse add_mutually_exclusive_group more than once has incorrectly 
formatted help
type: behavior
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9355>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to