paul j3 <ajipa...@gmail.com> added the comment:

The usage formatter is brittle, especially the part that adds mutually 
exclusive markings to the normal usage string.  I don't think I've seen this 
error before, but I'm not surprised. 

A real fix requires a rewrite of the usage formatter, which I've suggested in 
an other bug/issue.  It would be a good idea to include this as a test case for 
such a patch.

The simplest immediate fix is to just not use a mutually exclusive group when 
it isn't needed.  I don't think it's urgent enough to require a special patch.

---

start = actions.index(group._group_actions[0])

group is the mutually exclusive group that's being formatted.  _group_actions 
is is list of Actions.  The developer expected that the group would be 
populated (normally by 2 or more Actions), and didn't think it necessary to 
first check if it was empty.  That's a reasonable assumption.

----------
nosy: +paul.j3

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

Reply via email to