Catherine Devlin <fredv8vi...@liquidid.net> added the comment: This patch fixes it with a fourth approach: if unrecognized arguments are found during subparser parsing, information about them is inserted into the namespace (under "._unrecognized"), and the decision about whether to exit is deferred. When top-level parsing is finished, those recorded unrecognized args are added to whatever was found by the main parser.
It passes the tests I submitted yesterday. ---------- Added file: http://bugs.python.org/file18388/unrecognized_args_defer_exit.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9340> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com