bpo-29549: Fixes docstring for str.index#256
Merged
rhettinger merged 6 commits intopython:masterfrom Apr 5, 2017
Merged
Conversation
Carreau
approved these changes
Feb 23, 2017
Contributor
Carreau
left a comment
There was a problem hiding this comment.
Thank you. The "Like something else" docstring have been regularly bothering me.
DimitrisJim
approved these changes
Feb 24, 2017
vadmium
reviewed
Mar 31, 2017
| "S.index(sub[, start[, end]]) -> int\n\ | ||
| \n\ | ||
| Like S.find() but raise ValueError when the substring is not found."); | ||
| Return the lowest index in S where substring sub is found, \n\ |
vadmium
reviewed
Mar 31, 2017
| \n\ | ||
| Like B.find() but raise ValueError when the subsection is not found."); | ||
| Return the lowest index in B where subsection sub is found,\n\ | ||
| such that sub is contained within B[start,end]. Optional\n\ |
Member
There was a problem hiding this comment.
Needs a colon, not a comma: B[start:end]
(I presume these errors were copied from the “find” and “rfind” doc strings; they could also be fixed there, but at least don’t repeat the errors)
Mariatta
pushed a commit
to Mariatta/cpython
that referenced
this pull request
Apr 7, 2017
* Updates B.index documentation. * Updates str.index documentation, makes it Argument Clinic compatible. * Removes ArgumentClinic code. * Finishes string.index documentation. * Updates string.rindex documentation. * Documents B.rindex. (cherry picked from commit 43ba886)
jaraco
pushed a commit
that referenced
this pull request
Dec 2, 2022
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.
PR for https://bugs.python.org/issue29549