Message242201
| 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. |
|