[issue11874] argparse assertion failure with brackets in metavars

2014-09-09 Thread Zacrath
Changes by Zacrath mrdoom...@gmail.com: -- nosy: +Zacrath ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11874 ___ ___ Python-bugs-list mailing

[issue22363] argparse AssertionError with add_mutually_exclusive_group and help=SUPPRESS

2014-09-09 Thread Zacrath
Zacrath added the comment: I've confirmed that this is a duplicate of issue 17890. In case anyone needs it, a workaround is to move the mutually exclusive group to the end of the arguments. -- ___ Python tracker rep...@bugs.python.org http

[issue22363] argparse AssertionError with add_mutually_exclusive_group and help=SUPPRESS

2014-09-08 Thread Zacrath
New submission from Zacrath: Executing the attached script causes an AssertionError. Traceback (most recent call last): File bug.py, line 18, in module parser.format_usage() File /usr/lib/python3.4/argparse.py, line 2318, in format_usage return formatter.format_help() File /usr

[issue22363] argparse AssertionError with add_mutually_exclusive_group and help=SUPPRESS

2014-09-08 Thread Zacrath
Zacrath added the comment: This assert statement is only reached when the usage line is long enough that it needs to be wrapped. Which is why the assertion does not happen when an argument is removed. opt_usage is being compared to this string: [-h] [--arg2 ARG2] [--arg3 ARG3] [--arg4 ARG4