paul j3 added the comment:
This an issue for parse_args as well. parse_args just calls parse_known_args,
and raises an error if extras is not empty.
Early on in parsing, it tries to classify argument strings as either optionals
(--flags) or positionals (arguments). And there's an explicit
paul j3 added the comment:
Duplicate of
http://bugs.python.org/issue22433
--
resolution: - duplicate
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22909
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: - resolved
status: open - closed
superseder: - Argparse considers unknown optional arguments with spaces as a
known positional argument
___
Python tracker rep...@bugs.python.org
New submission from Tab Atkins Jr.:
If using parse_known_args() to get argument pass-through, and one of the
unknown arguments has a value with a space in it (even if quoted!), the
entire unknown argument (key=value) will be interpreted as the value of the
first positional argument instead.