[Python-checkins] cpython (3.2): #14236: mention Unicode whitespace in \s documentation.

ezio.melotti python-checkins at python.org
Sun Apr 29 07:24:10 CEST 2012


http://hg.python.org/cpython/rev/da9179248118
changeset:   76615:da9179248118
branch:      3.2
parent:      76612:7f35da912739
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Sun Apr 29 08:23:25 2012 +0300
summary:
  #14236: mention Unicode whitespace in \s documentation.

files:
  Lib/re.py |  5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/re.py b/Lib/re.py
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -69,7 +69,10 @@
              In string patterns without the ASCII flag, it will match the whole
              range of Unicode digits.
     \D       Matches any non-digit character; equivalent to [^\d].
-    \s       Matches any whitespace character; equivalent to [ \t\n\r\f\v].
+    \s       Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
+             bytes patterns or string patterns with the ASCII flag.
+             In string patterns without the ASCII flag, it will match the whole
+             range of Unicode whitespace characters.
     \S       Matches any non-whitespace character; equiv. to [^ \t\n\r\f\v].
     \w       Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
              in bytes patterns or string patterns with the ASCII flag.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list