bpo-23378: Add an extend action to argparse by isidentical · Pull Request #13305 · python/cpython
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='+'?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters