telmich added the comment: Proposal / resume from the previous tests:
- add a parameter to add_subparsers(): required If required=True, one of the subcommand names need to be present. If required=False (default), allow parse_args() to return successfully, if no subcommand is given. - Change implementation in such a way that using parser.set_defaults() on the main parser does not affect the sub parsers: Sub parsers are not related to the main parser like parent parsers and thus should not be affected by changes in the main parser. The second change would allow catching the case of no subcommands given and can be used to catch the empty arguments case. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com