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 calestyo, paul.j3, rhettinger
Date 2021-02-19.17:31:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613755864.77.0.9314223599.issue43259@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-02-19 17:31:04paul.j3setrecipients: + paul.j3, rhettinger, calestyo
2021-02-19 17:31:04paul.j3setmessageid: <1613755864.77.0.9314223599.issue43259@roundup.psfhosted.org>
2021-02-19 17:31:04paul.j3linkissue43259 messages
2021-02-19 17:31:04paul.j3create