bpo-23378: Add an extend action to argparse by isidentical · Pull Request #13305 · python/cpython

@isidentical

asottile

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch looks good, are there other nargs=... that this makes sense with? should it produce an error in the nonsensical cases? should it default to nargs='+'?

@isidentical

nargs=N doesn't make any sense (it doesn't need extend but extend can be used like append). but i dont think we should produce a ValueError etc.

furkanonder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix.

gvanrossum

gvanrossum

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup!

@miss-islington