Skip to content

Conversation

@lisroach
Copy link
Contributor

Copy link
Contributor

@Carreau Carreau left a comment

Choose a reason for hiding this comment

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

Thank you. The "Like something else" docstring have been regularly bothering me.

@zhangyangyu zhangyangyu requested a review from Mariatta March 30, 2017 08:42
"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\
Copy link
Member

Choose a reason for hiding this comment

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

Space before the newline

\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\
Copy link
Member

Choose a reason for hiding this comment

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

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)

@rhettinger rhettinger merged commit 43ba886 into python:master Apr 5, 2017
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)
Mariatta added a commit that referenced this pull request Apr 9, 2017
jaraco pushed a commit that referenced this pull request Dec 2, 2022
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.

7 participants