paul j3 added the comment:
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?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23058>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com