[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart
William Barnhart added the comment: I'm glad someone else thinks it's a good idea. If you have some ideas for tests, I'd be happy to help write them in order to spare the inconvenience (unless the tests are that easy to write then by all means please do). I can appreciate why the core

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart
Change by William Barnhart : -- keywords: +patch pull_requests: +24899 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26295 ___ Python tracker <https://bugs.python.org/issu

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart
New submission from William Barnhart : An issue I encountered recently with argparse was when I tried running a script with its argument changed from something like: ``` parser.add_argument('--please_work') ``` and was replaced with: ``` parser.add_argument('--please-work') ``` I have