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 paul.j3, siming85
Date 2018-08-28.20:27:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535488026.8.0.56676864532.issue34479@psf.upfronthosting.co.za>
In-reply-to
Content
The subparser is called with `parse_known_args` which just puts unknown args in a _UNRECOGNIZED_ARGS_ATTR attribute slot in the namespace, which is then passed back to the main parser.

(this occurs in _SubParsersAction.__call__)

If `parser.parse_known_args` is used, then these arguments will appear in the `extras` list.  Otherwise `parser.parse_args` issues the 'unrecognized arguments' error message (with the main parser usage).

I suspect this issue has been raised previously.  And I don't see any easy way of altering the behavior.
History
Date User Action Args
2018-08-28 20:27:06paul.j3setrecipients: + paul.j3, siming85
2018-08-28 20:27:06paul.j3setmessageid: <1535488026.8.0.56676864532.issue34479@psf.upfronthosting.co.za>
2018-08-28 20:27:06paul.j3linkissue34479 messages
2018-08-28 20:27:06paul.j3create