summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-11-12 05:34:00 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-11-12 05:34:00 (GMT)
commitfe6d54bf5dd63cc339212b8e76d4afb01d8d89b2 (patch)
tree9bca7c7b75c29effe8c9b5252d12ebb8d4238501
parent6e6ee30aad72425dd5a13c7a507f515318b1309e (diff)
parenta99ab63d06f422efad1c6b4669b955172ef1f62a (diff)
downloadcpython-fe6d54bf5dd63cc339212b8e76d4afb01d8d89b2.zip
cpython-fe6d54bf5dd63cc339212b8e76d4afb01d8d89b2.tar.gz
cpython-fe6d54bf5dd63cc339212b8e76d4afb01d8d89b2.tar.bz2
Merge with 3.5
-rw-r--r--Doc/library/re.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 8884584..a9f8161 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -556,13 +556,15 @@ form.
.. data:: X
VERBOSE
- This flag allows you to write regular expressions that look nicer. Whitespace
- within the pattern is ignored, except when in a character class or preceded by
- an unescaped backslash, and, when a line contains a ``'#'`` neither in a
- character class or preceded by an unescaped backslash, all characters from the
- leftmost such ``'#'`` through the end of the line are ignored.
-
- That means that the two following regular expression objects that match a
+ This flag allows you to write regular expressions that look nicer and are
+ more readable by allowing you to visually separate logical sections of the
+ pattern and add comments. Whitespace within the pattern is ignored, except
+ when in a character class or when preceded by an unescaped backslash.
+ When a line contains a ``#`` that is not in a character class and is not
+ preceded by an unescaped backslash, all characters from the leftmost such
+ ``#`` through the end of the line are ignored.
+
+ This means that the two following regular expression objects that match a
decimal number are functionally equal::
a = re.compile(r"""\d + # the integral part