Skip to content
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

bpo-34848 : Correct a method signature in docstring for range(..).index method #9877

Merged
merged 1 commit into from
May 3, 2019
Merged

Conversation

srinivasreddy
Copy link
Contributor

@srinivasreddy srinivasreddy commented Oct 14, 2018

@srinivasreddy
Copy link
Contributor Author

>>> range(100).index(2,0,10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: index() takes exactly one argument (3 given)
>>> range(100).index(2,0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: index() takes exactly one argument (2 given)
>>> range(100).index(2)
2
>>> range(100).index(100)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: 100 is not in range
>>> range(100).index(99)
99

@srinivasreddy srinivasreddy changed the title Closes bpo:34848 : Correct an incorrect method signature in docstring for range(..).index method Closes bpo:34848 : Correct a method signature in docstring for range(..).index method Oct 14, 2018
@srinivasreddy srinivasreddy changed the title Closes bpo:34848 : Correct a method signature in docstring for range(..).index method Closes bpo-34848 : Correct a method signature in docstring for range(..).index method Oct 14, 2018
@srinivasreddy srinivasreddy changed the title Closes bpo-34848 : Correct a method signature in docstring for range(..).index method bpo-34848 : Correct a method signature in docstring for range(..).index method Oct 23, 2018
@miss-islington
Copy link
Contributor

Thanks @srinivasreddy for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-13075 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 3, 2019
…ythonGH-9877)

(cherry picked from commit 22c5263)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
@srinivasreddy srinivasreddy deleted the 34848 branch May 3, 2019 12:28
miss-islington added a commit that referenced this pull request May 3, 2019
…H-9877)

(cherry picked from commit 22c5263)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants