Skip to content

Commit 869cdd2

Browse files
committed
gh-106318: Add "See also" for str.rstrip() and str.strip() methods
1 parent 25ab03f commit 869cdd2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,14 +2616,16 @@ expression support in the :mod:`re` module).
26162616
>>> 'mississippi'.rstrip('ipz')
26172617
'mississ'
26182618

2619-
See :meth:`str.removesuffix` for a method that will remove a single suffix
2619+
See :meth:`removesuffix` for a method that will remove a single suffix
26202620
string rather than all of a set of characters. For example::
26212621

26222622
>>> 'Monty Python'.rstrip(' Python')
26232623
'M'
26242624
>>> 'Monty Python'.removesuffix(' Python')
26252625
'Monty'
26262626

2627+
See also :meth:`strip`.
2628+
26272629

26282630
.. method:: str.split(sep=None, maxsplit=-1)
26292631

@@ -2792,6 +2794,8 @@ expression support in the :mod:`re` module).
27922794
>>> comment_string.strip('.#! ')
27932795
'Section 3.2.1 Issue #32'
27942796

2797+
See also :meth:`rstrip`.
2798+
27952799

27962800
.. method:: str.swapcase()
27972801

0 commit comments

Comments
 (0)