-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
argparse.ArgumentParser silently swallows multiple -- (double dash) #95468
Comments
PurityLake
added a commit
to PurityLake/cpython
that referenced
this issue
Jul 31, 2022
PurityLake
added a commit
to PurityLake/cpython
that referenced
this issue
Jul 31, 2022
savannahostrowski
added a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 16, 2024
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Sep 19, 2024
…arse Only the first one has now been removed, all subsequent ones are now taken literally.
This is a duplicate of #81691. |
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Sep 20, 2024
serhiy-storchaka
added a commit
that referenced
this issue
Sep 20, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 20, 2024
pythonGH-124274) (cherry picked from commit baa3550) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Sep 22, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 22, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 22, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 7, 2024
pythonGH-124274) (cherry picked from commit baa3550) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Oct 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this:
The semantics of
--
are to not attempt to parse the remaining command line options as parameters. Therefore, the expected output is:However, the actual output is:
In other words, the second
--
has silently been dropped.Interestingly enough, if the
arg1
parameter is dropped, this works correctly:Linked PRs
--
in cases where used to delineate positional args #124145The text was updated successfully, but these errors were encountered: