Pythass <[email protected]> added the comment:
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".
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue47002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com