William Barnhart <williambbarnh...@gmail.com> 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 developers could be polarized. One side could say 
it's safer to just take better care of our Python scripts and have them in 
wrapper functions. But people don't always do this.

In favor of the idea: This method can be used to spare developers from agony 
when a "_" is changed to a "-" when they aren't informed of the change. As a 
result, this can allow for code to remain usable since most developers are more 
interested in the letters of arguments and not so much special characters. But 
then again, a --help option could be all that's needed to fix this issue.

I think a solution that satisfies both parties would be creating some safe 
guard for adding arguments that are named identically, containing "_" or "-" in 
the middle, and raising an exception when the regexes of the arguments are 
conflicting. Such as if I wrote:
```
parser.add_argument('--please_work')
parser.add_argument('--please-work')
```
then an exception should be raised with an error for conflicting argument names.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44208>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to