[issue22909] [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg

2014-11-29 Thread paul j3
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

[issue22909] [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg

2014-11-29 Thread paul j3
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 ___

[issue22909] [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg

2014-11-29 Thread Berker Peksag
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

[issue22909] [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg

2014-11-20 Thread Tab Atkins Jr.
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.