[issue16142] ArgumentParser inconsistent with parse_known_args

Radu Ciorba report at bugs.python.org
Sat Feb 2 14:37:18 CET 2013


Radu Ciorba added the comment:

"- if the unknown option is given first then both options are treated as unknown and returned in the list of remaining arguments."
I don't think this case is correct behaviour. There is no way to determine if u accepts arguments or not. If nargs for -u is "?" or more, the current behavior is correct since everything after -u would be an argument for this option.

----------
nosy: +Radu.Ciorba

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16142>
_______________________________________


More information about the Python-bugs-list mailing list