GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — gh-106318: Add example for str.rindex() method by adorilson · Pull Request #143887 · python/cpython Conversation
|
|
|
||
| .. doctest:: | ||
|
|
||
| >>> 'spam, spam, spam'.rindex('eggs') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you add a successful example, like looking for spam?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sure.
But I did it this way to be in line with str.index, which doesn't have a successful example.
Should I add it there as well?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
But I did it this way to be in line with str.index, which doesn't have a successful example. Should I add it there as well?
Yes, I suggest to also add a successful example in str.index().
Try to use the same input string for both examples.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You didn't add a successful example to str.index().
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It is a new PR: #144408
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It doesn't deserve a whole new PR. Please change it in this PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh. "Tests / All required checks pass" CI failed with:
Let me try to update the branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @adorilson for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit 45d00a0) Co-authored-by: Adorilson Bezerra <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
(cherry picked from commit 45d00a0) Co-authored-by: Adorilson Bezerra <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
GH-144421 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-144422 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…144421) gh-106318: Add examples for str.rindex() method (GH-143887) (cherry picked from commit 45d00a0) Co-authored-by: Adorilson Bezerra <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
…144422) gh-106318: Add examples for str.rindex() method (GH-143887) (cherry picked from commit 45d00a0) Co-authored-by: Adorilson Bezerra <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
Merged, thanks. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.