Message415068
The curious aspect is that for:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1"])
args = parser.parse_args()
it works. But if we use the colon (:) character as:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1:"])
args = parser.parse_args()
it does not work anymore... I could think maybe the issue could be related to the presence of ":" character together with "-" character.
For example for:
choices=["-:"] does not work
choices=["-"] works
choices=[":"] works
choices=[":-"] works
So, we get the error if the option start with "-" and has inside also ":" character. At this point I don't think it is related strictly to "negative numbers". |
|
Date |
User |
Action |
Args |
2022-03-13 18:06:30 | Pythass | set | recipients:
+ Pythass, rhettinger, eric.smith, paul.j3, xtreak |
2022-03-13 18:06:30 | Pythass | set | messageid: <1647194790.23.0.461213701744.issue47002@roundup.psfhosted.org> |
2022-03-13 18:06:30 | Pythass | link | issue47002 messages |
2022-03-13 18:06:30 | Pythass | create | |
|