mirror of
https://github.com/python/cpython.git
synced 2025-09-17 22:20:23 +00:00
Merged revisions 86092 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86092 | steven.bethard | 2010-11-01 17:29:26 +0100 (Mon, 01 Nov 2010) | 1 line Fix for issue 9355 where with multiple mutually exclusive arguments, some brackets were being lost in the usage messages ........
This commit is contained in:
parent
784dd51ad2
commit
68c3678253
2 changed files with 27 additions and 2 deletions
|
@ -392,10 +392,16 @@ class HelpFormatter(object):
|
|||
for action in group._group_actions:
|
||||
group_actions.add(action)
|
||||
if not group.required:
|
||||
inserts[start] = '['
|
||||
if start in inserts:
|
||||
inserts[start] += ' ['
|
||||
else:
|
||||
inserts[start] = '['
|
||||
inserts[end] = ']'
|
||||
else:
|
||||
inserts[start] = '('
|
||||
if start in inserts:
|
||||
inserts[start] += ' ('
|
||||
else:
|
||||
inserts[start] = '('
|
||||
inserts[end] = ')'
|
||||
for i in range(start + 1, end):
|
||||
inserts[i] = '|'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue