]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118508: Clarify which characters are matched by `\s` (#119155)
authorNice Zombies <nineteendo19d0@gmail.com>
Mon, 2 Sep 2024 11:48:15 +0000 (13:48 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Sep 2024 11:48:15 +0000 (07:48 -0400)
Clarify re syntax

Doc/library/re.rst

index cc979fe66f7fe96d758adff3eb317e40a5c3e9e9..efb2722f18038fd9c08801b90212556c8eae94db 100644 (file)
@@ -600,10 +600,9 @@ character ``'$'``.
 
 ``\s``
    For Unicode (str) patterns:
-      Matches Unicode whitespace characters (which includes
-      ``[ \t\n\r\f\v]``, and also many other characters, for example the
-      non-breaking spaces mandated by typography rules in many
-      languages).
+      Matches Unicode whitespace characters (as defined by :py:meth:`str.isspace`).
+      This includes ``[ \t\n\r\f\v]``, and also many other characters, for example the
+      non-breaking spaces mandated by typography rules in many languages.
 
       Matches ``[ \t\n\r\f\v]`` if the :py:const:`~re.ASCII` flag is used.