Closed GoogleCodeExporter closed 9 years ago
I'm certainly open to such a feature. Patches are welcome. :)
To make this work we'd have to teach _SubParsersAction to accept nargs='?'.
This is a
little complicated because currently _SubParsersAction tells the parser that it
wants
to consume everything else by passing nargs=PARSER. So we'd need some sort of
nargs=PARSER_OR_NOTHING and the corresponding code everywhere that nargs is
used.
Perhaps there's an easier way though...
Original comment by steven.b...@gmail.com
on 7 Dec 2009 at 12:17
I was just trying to set up optional subparsers and stumbled upon this thread.
Has
there been any progress on this issue?
Regards, Lars
Original comment by swedishl...@gmail.com
on 22 Apr 2010 at 5:12
Nope. ;-)
Original comment by steven.b...@gmail.com
on 22 Apr 2010 at 10:36
Moved to http://bugs.python.org/issue9253
Original comment by steven.b...@gmail.com
on 23 Jul 2010 at 12:03
Original issue reported on code.google.com by
sgusta...@gmail.com
on 28 Nov 2009 at 3:35