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 barry
Recipients Changaco, barry, gregory.p.smith, nailor, paul.j3, r.david.murray, remram
Date 2015-04-28.18:53:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430247193.04.0.463751200509.issue23058@psf.upfronthosting.co.za>
In-reply-to
Content
> Wouldn't it be safer all around if the subparsers took different arguments, or at least different namespace 'dest', than the main parser?

IMHO, yes.  I agree that the semantics of what the original code is trying to do is quite ambiguous.  Since the documentation says that parents= causes all the given parsers and adds their options to the parser being constructed, I'd take that to mean that the -v before the command, and the command's -v would point to the same dest.  The admonition for add_help=False seems to reinforce that.

The fact that this used to work should be considered an accident.  I wouldn't call it a regression because the documentation does not make it clear that this should work.  I think this is not a bug.

Feel free to reopen this if you disagree and and cite a convincing argument for sharing dests.  To be totally unambiguous, use different destinations.

FWIW, I've never used parents myself.  I've always done something like what honcho eventually landed.
History
Date User Action Args
2015-04-28 18:53:13barrysetrecipients: + barry, gregory.p.smith, r.david.murray, nailor, paul.j3, remram, Changaco
2015-04-28 18:53:13barrysetmessageid: <1430247193.04.0.463751200509.issue23058@psf.upfronthosting.co.za>
2015-04-28 18:53:13barrylinkissue23058 messages
2015-04-28 18:53:12barrycreate