[issue26952] argparse help formatter crashes

paul j3 report at bugs.python.org
Sun Jul 7 13:02:38 EDT 2019


paul j3 <ajipanca at gmail.com> added the comment:

Xiang Zhang pointed out that the immediate error in this case was caused by the empty mutually exclusive group:

https://bugs.python.org/issue26952#msg264835

The nesting fails because adding actions to the argument_group does not enroll them in the mutually exclusive group.  So the group._group_actions list remains empty, just as it is in your case.

As I pointed out earlier, the usage formatter is brittle.  The addition of mutually exclusive group markings is particularly clunky.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26952>
_______________________________________


More information about the Python-bugs-list mailing list