This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author the.mulhern
Recipients the.mulhern
Date 2015-02-02.14:23:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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)


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:10the.mulhernsetrecipients: + the.mulhern
2015-02-02 14:23:10the.mulhernsetmessageid: <>
2015-02-02 14:23:10the.mulhernlinkissue23378 messages
2015-02-02 14:23:10the.mulherncreate