paul j3 <[email protected]> added the comment:
I think it's the same issue. A dash argument that is not clearly a number is
interpreted as an optional's flag. With few exceptions, the parser does not
examine the contents of the string
It tests the initial character, it tests for space, it tests for numbers (I'm
not sure scientific notation is accepted). That's about it.
Argparse has a minimum of constrains on what is a valid flag string. For
example, the following is ok:
parser.add_argument('-1,2')
# appearing the namespace as: Namespace(**{'1,2': None})
----------
nosy: +paul.j3
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35049>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com