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

2021-05-25 Thread Catherine Devlin
Catherine Devlin added the comment: All that said, it's easy to imagine a PyPI package that would give this functionality for those who want it. Maybe even one that could also alter the behavior of Click and Typer. If you want to go that route, let me know. --

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

2021-05-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: William, thank you for the suggestion, but we're going to decline for the reasons listed by Eric and me. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2021-05-25 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: I've never seen this behavior anywhere. In general, I think being looser with allowed inputs is not a good idea. -- nosy: +eric.smith ___ Python tracker

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

2021-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ideally, we should keep argparse in line with common practices. AFAICT, treating '-' and '_' the same isn't a norm. Click, for example, doesn't do this. -- nosy: +rhettinger versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python

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

2021-05-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 Catherine Devlin
Catherine Devlin added the comment: Your PR doesn't include any tests... but I like the idea enough to create the tests for you if you prefer. However, first I'd like to see whether the core devs like the idea. I could see saying either "yes, why not make things easy" or "no, there should

[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

[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 not