This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients ariel-anieli, bethard, paul.j3
Date 2018-05-05.02:22:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1525486950.5.0.682650639539.issue33415@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-05-05 02:22:30paul.j3setrecipients: + paul.j3, bethard, ariel-anieli
2018-05-05 02:22:30paul.j3setmessageid: <1525486950.5.0.682650639539.issue33415@psf.upfronthosting.co.za>
2018-05-05 02:22:30paul.j3linkissue33415 messages
2018-05-05 02:22:29paul.j3create