New submission from Chris Jerdonek: Currently, argparser's subparsers.add_parser() method (for adding sub-commands) takes the following input:
"This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual." (from http://docs.python.org/dev/library/argparse.html#argparse.ArgumentParser.add_subparsers ) It would be nice if one could also pass an ArgumentParser object to add_parser(). This would allow the composition of parsers. For example, if a library exposed an ArgumentParser command-line API, one could expose that library's commands as a sub-command of the parent project's command-line API using add_parser(). ---------- components: Library (Lib) messages: 182081 nosy: bethard, chris.jerdonek priority: normal severity: normal stage: needs patch status: open title: argparser's subparsers.add_parser() should accept an ArgumentParser type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17204> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com