Barry A. Warsaw added the comment: > 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. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23058> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com