paul j3 added the comment:

This patch produces the same usage as before, but I have rewritten 
_format_actions_usage() for both HelpFormatter and MultiGroupFormater.

The original HelpFormatter._format_actions_usage() formats the actions, splices 
in group markings, cleans up the text, if needed, tries to break it down into 
parts.  But this is fragile, as shown here and in issues 11874, 18349).

Now _format_group_usage() and _format_just_actions_usage() format groups and 
actions directly, without the splice and divide steps.  _format_actions_usage() 
for both classes call these to build a list of usage parts.

This change also solves http://bugs.python.org/issue11874 and 
http://bugs.python.org/issue18349, since it does not have to break up a 
formatted text line (and in the process get confused by [] and ()).

----------
Added file: http://bugs.python.org/file30940/multigroup_4.patch

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

Reply via email to