SpaceOne added the comment:
In replay to msg238931 from paul j3 (paul.j3) *
> And specifying something other than the default 'store' action class for the
> arguments of the parsers doesn't make sense.
Of course it makes sense. If you e.g. want the action to be 'append' so that
the subparser-name is appended to a already existing list / or to create a new
list with the subparser-name as first argument.
E.g.:
parser.add_subparser(dest='foo', action='append')
parser.parse_args('bar').__dict__ == {'foo': ['bar']}
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23487>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com