New submission from Mads Michelsen <madch...@gmail.com>: This is a follow-up to Issue 58 from the Google Project Hosting bug tracker (http://code.google.com/p/argparse/issues/detail?id=58). I couldn't find any equivalent/re-posting of it here, so I took the liberty of creating a new one - despite the bug being marked 'WontFix' on Google. The reason for this is that I cannot make the suggested workaround... well, work.
The root problem: the argparse parser add_mutually_exclusive_group method does not accept title or description arguments. The workaround: steven.bethard suggests on google to create a 'straight' dummy group (i.e. one made using the title-accepting add_argument_group method) and then attach the mutually exclusive group to the dummy group - which is attached to the parser itself. The problem: while the group does appear as a group with title on the help output, the group does not appear to actually _be_ mutually exclusive (I get no objections to running several arguments from the same group together) nor does it display as mutually exclsuive on the help output. Please see attached file for code + resulting output. (I hope I'm doing this right - this is my first bug report, so bear with and instruct me if I'm getting it wrong) ---------- components: Library (Lib) files: argsconfig.txt messages: 123797 nosy: Mads.Michelsen priority: normal severity: normal status: open title: argparse: titles and add_mutually_exclusive_group don't mix (even with workaround) type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file20014/argsconfig.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10680> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com