Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-66419: Make optional arguments with nargs=REMAINDER consume all arguments#124509

Merged
serhiy-storchaka merged 3 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-optional-remainderserhiy-storchaka/cpython:argparse-optional-remainderCopy head branch name to clipboard
Mar 18, 2026
Merged

gh-66419: Make optional arguments with nargs=REMAINDER consume all arguments#124509
serhiy-storchaka merged 3 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:argparse-optional-remainderserhiy-storchaka/cpython:argparse-optional-remainderCopy head branch name to clipboard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 25, 2024

Copy link
Copy Markdown
Member

…all arguments

It no longer stops at the first '--'.

@savannahostrowski savannahostrowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment for the news entry but LGTM so long as we don't backport!

Comment thread Misc/NEWS.d/next/Library/2024-09-25-12-47-50.gh-issue-66419.DVSukU.rst Outdated
…SukU.rst

Co-authored-by: Savannah Ostrowski <savannah@python.org>
@serhiy-storchaka serhiy-storchaka merged commit 70c7e04 into python:main Mar 18, 2026
47 checks passed
@serhiy-storchaka serhiy-storchaka deleted the argparse-optional-remainder branch March 18, 2026 15:04
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Thank you for your review @savannahostrowski.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

argparse not including '--' arguments in previous optional REMAINDER argument

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.