paul j3 added the comment:

I just filed a patch with http://bugs.python.org/issue10984 (argparse 
add_mutually_exclusive_group should accept existing arguments to register 
conflicts) that includes the latest patch from this issue.  I tweaked it so 
_format_actions_usage only returns arg_parts.  The block of _re. statements (# 
clean up separators for mutually exclusive groups) are in a nested function so 
it can be applied to each of the parts.

In that issue I wrote a custom formatter that handles groups even if they share 
actions, or the action order does not match definition order.  For that it is 
easier to work with the arg_parts as generated here rather than the whole usage 
line.

----------

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

Reply via email to