Skip to content

Commit 94f3a81

Browse files
committed
gh-69619: Define whitespace for str.lstrip() and str.rstrip()
1 parent 7a468a1 commit 94f3a81

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,8 @@ expression support in the :mod:`re` module).
23762376

23772377
Return a copy of the string with leading characters removed. The *chars*
23782378
argument is a string specifying the set of characters to be removed. If omitted
2379-
or ``None``, the *chars* argument defaults to removing whitespace. The *chars*
2379+
or ``None``, the *chars* argument defaults to removing whitespace, that is
2380+
characters for which :meth:`str.isspace` is true. The *chars*
23802381
argument is not a prefix; rather, all combinations of its values are stripped::
23812382

23822383
>>> ' spacious '.lstrip()
@@ -2579,7 +2580,8 @@ expression support in the :mod:`re` module).
25792580

25802581
Return a copy of the string with trailing characters removed. The *chars*
25812582
argument is a string specifying the set of characters to be removed. If omitted
2582-
or ``None``, the *chars* argument defaults to removing whitespace. The *chars*
2583+
or ``None``, the *chars* argument defaults to removing whitespace, that is
2584+
characters for which :meth:`str.isspace` is true. The *chars*
25832585
argument is not a suffix; rather, all combinations of its values are stripped.
25842586
For example:
25852587

0 commit comments

Comments
 (0)