diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-10 09:59:16 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-04-10 09:59:16 (GMT) |
commit | 88fdeb45ef86385b5ac212929fbbf69711f9245a (patch) | |
tree | b47ec89f01df6c7ce0518ad8fe5e261f4694fec6 /Doc/library/re.rst | |
parent | 344d26c7a08896a1eb54f638e80de0d0fadfad39 (diff) | |
download | cpython-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.rst | 9 |
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() |