Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-106318: Add example for str.rindex() method#143887
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
| .. doctest:: | ||
| >>> 'spam, spam, spam'.rindex('eggs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you add a successful example, like looking forspam?
There was a problem hiding this comment.
Choose a reason for 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 withstr.index, which doesn't have a successful example.
Should I add it there as well?
There was a problem hiding this comment.
Choose a reason for 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done here.
There was a problem hiding this comment.
Choose a reason for 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().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is a new PR:#144408
There was a problem hiding this comment.
Choose a reason for 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.
Uh oh!
There was an error while loading.Please reload this page.
WIP to#106318
#106318: Add examples for str.rindex() method
📚 Documentation preview 📚:https://cpython-previews--143887.org.readthedocs.build/