This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wbarnha
Recipients wbarnha
Date 2021-05-21.17:51:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621619480.47.0.120101426559.issue44208@roundup.psfhosted.org>
In-reply-to
Content
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 ever seen anyone add an argument where a function has two arguments existing in a function, such as please_work and please-work. I think this is a pretty safe feature to implement, plus it enforces good practices. So if I wrote something such as:

```
parser = argparse.ArgumentParser(description="check this out")
parser.add_argument('--please-work')
```

Then I could call the program using:
```
python3 test.py --please_work True
```
or:
```
python3 test.py --please-work True
```
History
Date User Action Args
2021-05-21 17:51:20wbarnhasetrecipients: + wbarnha
2021-05-21 17:51:20wbarnhasetmessageid: <1621619480.47.0.120101426559.issue44208@roundup.psfhosted.org>
2021-05-21 17:51:20wbarnhalinkissue44208 messages
2021-05-21 17:51:20wbarnhacreate