Message235260
As well as the append action it would be convenient for there to be an extend action.
This is kind of useful to allow something like:
parser.add_argument("--foo", action="extend", nargs="+", type=str)
given
parser.parse_args("--foo f1 --foo f2 f3 f4".split())
to result in
["f1", "f2", "f3", "f4"].
The action "append" results in
[["f1"], ["f2", "f3", "f4"]]
And action store in
["f2", "f3", "f4"].
It is easy to write a custom action, but it feels like a fairly common requirement.
Probably it would make sense to extend the default, similarly to how append behaves. |
|
Date |
User |
Action |
Args |
2015-02-02 14:23:10 | the.mulhern | set | recipients:
+ the.mulhern |
2015-02-02 14:23:10 | the.mulhern | set | messageid: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> |
2015-02-02 14:23:10 | the.mulhern | link | issue23378 messages |
2015-02-02 14:23:10 | the.mulhern | create | |
|