Uh oh!
There was an error while loading. Please reload this page.
gh-106318: Improve str.rstrip() method doc - #143893
Conversation
…method doc str.removesuffix() docs have their own examples.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
| See :meth:`str.removesuffix` for a method that will remove a single suffix | ||
| string rather than all of a set of characters. For example:: | ||
| See also :meth:`strip` and :meth:`removesuffix`. |
There was a problem hiding this comment.
We should keep the original for these lines.
- it is eye-catching and surprising
- It shows the two methods side-by-side.
- it honors our forebearers.
There was a problem hiding this comment.
I agree. I like these 'Monty Python' examples, I would also prefer to keep them.
There was a problem hiding this comment.
Done. With other improvements.
…split() method doc" This reverts commit 9fa3ecc. As asked by @nedbat on pythongh-143893
vstinner
commented
Feb 11, 2026
Merged, thanks. |
Thanks @adorilson for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks @adorilson for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
(cherry picked from commit 936d60d) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 936d60d) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
GH-144698 is a backport of this pull request to the 3.13 branch. |
GH-144699 is a backport of this pull request to the 3.14 branch. |
vstinner
commented
Feb 11, 2026
Merged, thanks. |
Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
WIP to #106318
#106318: Improve str.rstrip() method doc
📚 Documentation preview 📚: https://cpython-previews--143893.org.readthedocs.build/