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.
Created on 2010年07月23日 14:35 by bethard, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| argparse.diff | ddowsett, 2010年07月29日 18:53 | Patch for Issue9355 in HelpFormatter._format_actions_usage | ||
| test_mutually_exclusive.patch | catherine, 2010年08月04日 20:24 | review | ||
| mutually_exclusive_help.patch | catherine, 2010年08月04日 20:26 | copy of argparse.diff | review | |
| Messages (5) | |||
|---|---|---|---|
| msg111335 - (view) | Author: Steven Bethard (bethard) * (Python committer) | Date: 2010年07月23日 14:35 | |
[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. |
|||
| msg111987 - (view) | Author: Drake Dowsett (ddowsett) | Date: 2010年07月29日 18:53 | |
Problem is `inserts' dictionary is overwriting previous closing bracket, so checking for existing value and then appending if found. |
|||
| msg112884 - (view) | Author: Catherine Devlin (catherine) | Date: 2010年08月04日 20:24 | |
Unit test for Drake's patch |
|||
| msg112885 - (view) | Author: Catherine Devlin (catherine) | Date: 2010年08月04日 20:26 | |
copy of Drake's argparse.diff - same patch, just has less specific diff header info (because ``patch -p0 < argparse.diff`` failed on my machine) |
|||
| msg120136 - (view) | Author: Steven Bethard (bethard) * (Python committer) | Date: 2010年11月01日 16:31 | |
Committed in r86092 (3.X) and r86093 (2.7). Thanks for the patches! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:04 | admin | set | github: 53601 |
| 2010年12月21日 10:36:28 | bethard | set | nosy:
bethard, ddowsett, catherine stage: needs patch -> resolved |
| 2010年11月01日 16:31:22 | bethard | set | status: open -> closed assignee: bethard resolution: fixed messages: + msg120136 |
| 2010年08月04日 20:26:42 | catherine | set | files:
+ mutually_exclusive_help.patch messages: + msg112885 |
| 2010年08月04日 20:24:46 | catherine | set | files:
+ test_mutually_exclusive.patch nosy: + catherine messages: + msg112884 |
| 2010年07月29日 18:53:35 | ddowsett | set | files:
+ argparse.diff versions: + Python 2.6 nosy: + ddowsett messages: + msg111987 keywords: + patch |
| 2010年07月23日 14:35:22 | bethard | create | |