[issue9253] argparse: optional subparsers

2012-09-14 Thread Benjamin West
Benjamin West added the comment: https://gist.github.com/1202975#file_test_opt_subcommand.py I sketched out a sloppy test earlier. I think this test is probably not quite comprehensive enough, and I'm not sure it fits into the python style either. I suppose there are other tests I can more

[issue9253] argparse: optional subparsers

2012-01-07 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Thanks Eric. I was thrown by this document: http://wiki.python.org/moin/Git which describes fetching the sources from SVN using git. I'm comfortable doing either, but it doesn't resolve my confusion. The version of argparse in the python

[issue9253] argparse: optional subparsers

2012-01-07 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Thanks Eric. I was thrown by this document: http://wiki.python.org/moin/Git which describes fetching the sources from SVN using git. I'm comfortable doing either, but it doesn't resolve my confusion. The version of argparse in the python

[issue9253] argparse: optional subparsers

2012-01-07 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Ok, here's a rough attempt at stubbing this out against a python checkout. Will try to look at adding tests. (BTW, subsequent GETs should not modify the bug tracker... this seems like a bug since GET should be idempotent, but SFTN from

[issue9253] argparse: optional subparsers

2012-01-07 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Ok, here's a rough attempt at stubbing this out against a python checkout. Will try to look at adding tests. (BTW, subsequent GETs should not modify the bug tracker... this seems like a bug since GET should be idempotent, but SFTN from

[issue9253] argparse: optional subparsers

2012-01-06 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Ok, Steven, that sounds reasonable. I checked out git-svn python and started comparing diffs... I'm a little confused. What version of argparse should be patched to provide this feature? My HG version from https://code.google.com/p/argparse

[issue9253] argparse: optional subparsers

2012-01-06 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: Ok, Steven, that sounds reasonable. I checked out git-svn python and started comparing diffs... I'm a little confused. What version of argparse should be patched to provide this feature? My HG version from https://code.google.com/p/argparse

[issue9253] argparse: optional subparsers

2011-09-24 Thread Benjamin West
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

[issue9253] argparse: optional subparsers

2011-09-24 Thread Benjamin West
Benjamin West bew...@gmail.com added the comment: https://github.com/bewest/argparse/tree/bewest https://bitbucket.org/bewest/argparse/changesets I think this does the right thing. -- hgrepos: +69 ___ Python tracker rep...@bugs.python.org http