gh-118508: Clarify which characters are matched by `\s` (#119155)

Clarify re syntax
This commit is contained in:
Nice Zombies 2024-09-02 13:48:15 +02:00 committed by GitHub
parent 23f159ae71
commit 22fdb8cf89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View 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.