Skip to content

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

Merged
vstinner merged 1 commit into
python:masterfrom
srinivasreddy:34848
May 3, 2019
Merged

bpo-34848 : Correct a method signature in docstring for range(..).index method#9877
vstinner merged 1 commit into
python:masterfrom
srinivasreddy:34848

Conversation

@srinivasreddy

@srinivasreddy srinivasreddy commented Oct 14, 2018

Copy link
Copy Markdown
Contributor

@srinivasreddy

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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