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 Changaco, gregory.p.smith, nailor, paul.j3, r.david.murray, remram
Date 2015-03-27.20:36:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427488564.02.0.887334150381.issue23058@psf.upfronthosting.co.za>
In-reply-to
Content
Without actually running this case I think it is caused by the  http://bugs.python.org/issue9351  patch.

You can check the __call__ method for class _SubParsersAction and how it handles invocation of the subparser.  Does it get the existing namespace, or a new one (None)?

There is an inherent ambiguity when the same argument ('dest' actually) is defined for both the parser and the subparser.  Doubly so when both get it via 'parents'.  Which default and which argument string has priority?

That other issue tried to fix the case where the subparser's default was being ignored, and in the process created a case where the parser's argument string is being ignored.

Wouldn't it be safer all around if the subparsers took different arguments, or at least different namespace 'dest', than the main parser?
History
Date User Action Args
2015-03-27 20:36:04paul.j3setrecipients: + paul.j3, gregory.p.smith, r.david.murray, nailor, remram, Changaco
2015-03-27 20:36:04paul.j3setmessageid: <1427488564.02.0.887334150381.issue23058@psf.upfronthosting.co.za>
2015-03-27 20:36:04paul.j3linkissue23058 messages
2015-03-27 20:36:03paul.j3create