paul j3 added the comment:

This patch accomplishes this task by adding a  _PseudoGroup class to 
_SubParsersAction.  It's like the _ChoicesPseudoAction except that it maintains 
its own _choices_actions list.

It takes advantage of the fact that formatter._format_actions is recursive when 
it comes to actions in _choices_actions.  In fact it is possible to define 
groups within groups (not that I would recommend that).

There is one simple test case in test_argparse, similar to the example in this 
issue.

----------
keywords: +patch
Added file: http://bugs.python.org/file35733/issue9341_1.patch

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

Reply via email to