Skip to content

Conversation

@adorilson
Copy link
Contributor

@adorilson adorilson commented Jan 15, 2026

WIP to #106318

#106318: Improve str.rstrip() method doc


📚 Documentation preview 📚: https://cpython-previews--143893.org.readthedocs.build/

Co-authored-by: Victor Stinner <[email protected]>
@adorilson adorilson requested a review from vstinner January 19, 2026 14:24
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


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`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I like these 'Monty Python' examples, I would also prefer to keep them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. With other improvements.

@adorilson adorilson requested review from nedbat and vstinner February 10, 2026 20:31
@vstinner vstinner merged commit 936d60d into python:main Feb 11, 2026
29 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Feb 11, 2026
@vstinner
Copy link
Member

Merged, thanks.

@vstinner vstinner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Feb 11, 2026
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 11, 2026
(cherry picked from commit 936d60d)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 11, 2026
(cherry picked from commit 936d60d)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Feb 11, 2026

GH-144698 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Feb 11, 2026
@bedevere-app
Copy link

bedevere-app bot commented Feb 11, 2026

GH-144699 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Feb 11, 2026
@vstinner
Copy link
Member

Merged, thanks.

vstinner added a commit that referenced this pull request Feb 11, 2026
gh-106318: Improve str.rstrip() method doc (GH-143893)
(cherry picked from commit 936d60d)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
vstinner added a commit that referenced this pull request Feb 11, 2026
gh-106318: Improve str.rstrip() method doc (GH-143893)
(cherry picked from commit 936d60d)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants