[issue43160] argparse: add extend_const action

2021-02-08 Thread Tony Lykke
Tony Lykke added the comment: Sorry, there's a typo in my last comment. --store --foo a Namespace(foo=['a', 'b', 'c']) from the first set of examples should have been --store --foo c Namespace(foo=['a', 'b', 'c']) --

[issue43160] argparse: add extend_const action

2021-02-08 Thread Tony Lykke
Tony Lykke added the comment: Perhaps the example I added to the docs isn't clear enough and should be changed because you're right, that specific one can be served by store_const. Turns out coming up with examples that are minimal but not too contrived is hard! Let me try again with a

[issue43160] argparse: add extend_const action

2021-02-08 Thread paul j3
paul j3 added the comment: It's not clear what your patch does that the existing 'store_const' doesn't. Even 'append_const' does the same except for a extra level of list/tuple nesting. But I'll admit that I didn't much need for 'extend' addition, but others, including the original

[issue43160] argparse: add extend_const action

2021-02-07 Thread hai shi
Change by hai shi : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43160] argparse: add extend_const action

2021-02-07 Thread Tony Lykke
Change by Tony Lykke : -- keywords: +patch pull_requests: +23269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24478 ___ Python tracker ___

[issue43160] argparse: add extend_const action

2021-02-07 Thread Tony Lykke
New submission from Tony Lykke : I submitted this to the python-ideas mailing list early last year: https://mail.python.org/archives/list/python-id...@python.org/thread/7ZHY7HFFQHIX3YWWCIJTNB4DRG2NQDOV/. Recently I had some time to implement it (it actually turned out to be pretty trivial),