New submission from Jorge L. Martinez <j...@fastmail.com>:

$ python -c '
import argparse
p = argparse.ArgumentParser()
p.add_argument("first_arg")
p.add_argument("args", nargs="*")
r = p.parse_args(["foo", "--", "bar", "--", "baz", "--", "zap"])
print(r.first_arg + " " + " ".join(r.args))
'                        

returns:

foo bar baz -- zap

when I think it should return:

foo bar -- baz -- zap

----------
components: Library (Lib)
messages: 347378
nosy: jol
priority: normal
severity: normal
status: open
title: argparse removing more "--" than it should
type: behavior
versions: Python 3.7

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

Reply via email to