r1kk3r <gael.jo...@switzerlandmail.ch> added the comment:

Another issue:

parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument('-verbose', type=int, required=True, dest="bla", help="bla")
known_args, rest_of_args = parser.parse_known_args(["-v", "-verbose=2"])

With python 3.8.5

test.py: error: argument -verbose: expected one argument

With python 3.7.8

<no error>


This is really annoying. Argparse tries to do "smart" things where it 
shouldn't. I want it to parse -verbose, I never told him that -v is an alias 
for -verbose...

----------

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

Reply via email to