paul j3 <ajipa...@gmail.com> added the comment:
The parents mechanism is not elaborate. It copies groups and actions by reference. The comments that I quoted actually come from that method that does this copying. >From a quick glance at that code I see that it does not preserve the group >nesting. Mutually_exclusive groups are added directly the parser. Parents is primarily a convenience tool, especially if used entirely with your own code. It's most valuable when importing the parent, and you don't have direct access to the code that constructed it. But it seems to be used most often as a way of creating a number of similar subparsers. For that it can be easily replaced with your own utility function(s). There's no virtue in trying to do everything with the tools that argparse provides. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43259> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com