Skip to content

gh-69619: Add whitespace term to glossary and reference in stdtypes.rst #132568

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Wrap some more lines...
  • Loading branch information
StanFromIreland committed Apr 16, 2025
commit dd9ddd004a4b5e088ef1ad3f0738c0d97b23993f
4 changes: 2 additions & 2 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1466,8 +1466,8 @@ Glossary
<https://www.unicode.org/reports/tr44/>`_ as "Other" or "Separator"
and those with bidirectional property being one of "WS," "B," or "S."

This is used, for example, to :meth:`~str.split` or
:meth:`~str.strip` strings.
For example, this is used to :meth:`~str.split` or :meth:`~str.strip`
strings.

Zen of Python
Listing of Python design principles and philosophies that are helpful in
Expand Down
16 changes: 8 additions & 8 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2350,9 +2350,9 @@ expression support in the :mod:`re` module).

Return a copy of the string with the leading and trailing characters removed.
The *chars* argument is a string specifying the set of characters to be removed.
If omitted or ``None``, the *chars* argument defaults to removing :term:`whitespace`.
The *chars* argument is not a prefix or suffix; rather, all combinations of its
values are stripped::
If omitted or ``None``, the *chars* argument defaults to removing
:term:`whitespace`. The *chars* argument is not a prefix or suffix; rather,
all combinations of its values are stripped::

>>> ' spacious '.strip()
'spacious'
Expand Down Expand Up @@ -3290,8 +3290,8 @@ produce new objects.
as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits
are done, the *rightmost* ones. If *sep* is not specified or ``None``,
any subsequence consisting solely of :term:`ASCII whitespace <whitespace>`
is a separator. Except for splitting from the right, :meth:`rsplit` behaves like
:meth:`split` which is described in detail below.
is a separator. Except for splitting from the right, :meth:`rsplit` behaves
like :meth:`split` which is described in detail below.


.. method:: bytes.rstrip([chars])
Expand Down Expand Up @@ -3379,9 +3379,9 @@ produce new objects.
removed. The *chars* argument is a binary sequence specifying the set of
byte values to be removed - the name refers to the fact this method is
usually used with ASCII characters. If omitted or ``None``, the *chars*
argument defaults to removing :term:`ASCII whitespace <whitespace>`. The *chars*
argument is not a prefix or suffix; rather, all combinations of its values are
stripped::
argument defaults to removing :term:`ASCII whitespace <whitespace>`.
The *chars* argument is not a prefix or suffix; rather, all combinations of
its values are stripped::

>>> b' spacious '.strip()
b'spacious'
Expand Down
Loading