Benjamin West <bew...@gmail.com> added the comment: I spent some time looking at this, as I was interested in using this pattern to simulate what git and hg do. I considered a few modifications and then found this bug. I think the default keyword passed to _SubParsersAction.__init__ makes sense.
I started on a patch, that looks promising, but I'm having trouble getting the regexp right. Here's a changeset higlighting where I think the problematic regexp is: https://bitbucket.org/bewest/argparse/changeset/938e1e91ddd0 https://gist.github.com/1202975#file_test_opt_subcommand.py Is the meager little test I put together. ---------- hgrepos: +68 nosy: +Benjamin.West _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9253> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com