summaryrefslogtreecommitdiffstats
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-10 09:59:16 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-10 09:59:16 (GMT)
commit88fdeb45ef86385b5ac212929fbbf69711f9245a (patch)
treeb47ec89f01df6c7ce0518ad8fe5e261f4694fec6 /Doc/library/re.rst
parent344d26c7a08896a1eb54f638e80de0d0fadfad39 (diff)
downloadcpython-88fdeb45ef86385b5ac212929fbbf69711f9245a.zip
cpython-88fdeb45ef86385b5ac212929fbbf69711f9245a.tar.gz
cpython-88fdeb45ef86385b5ac212929fbbf69711f9245a.tar.bz2
#2650: re.escape() no longer escapes the "_".
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 3e9cf02..b1c3804 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -689,9 +689,12 @@ form.
.. function:: escape(string)
- Return *string* with all non-alphanumerics backslashed; this is useful if you
- want to match an arbitrary literal string that may have regular expression
- metacharacters in it.
+ Escape all the characters in pattern except ASCII letters, numbers and ``'_'``.
+ This is useful if you want to match an arbitrary literal string that may
+ have regular expression metacharacters in it.
+
+ .. versionchanged:: 3.3
+ The ``'_'`` character is no longer escaped.
.. function:: purge()