Repository navigation
gh-101472: Redocument argparse.REMAINDER and its limitations - #160119
Open
savannahostrowski wants to merge 2 commits into
Open
savannahostrowski wants to merge 2 commits into
savannahostrowski wants to merge 2 commits into
Conversation
Documentation build overview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings
argparse.REMAINDERback into the docs. It’s still useful, still used in the stdlib and beyond, and isn’t deprecated.The original decision to undocument it was discussed in #61252, but I think spelling out the boundaries would better serve users. We can make it clearer what they can/should rely on and help them avoid the pitfalls that led to removing the docs in the first place.
I’ve also added focused regression tests for the boundaries described here. Since these quirks are part of what prompted undocumenting REMAINDER, I think we should test the behavior we’re now documenting.