diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 20:58:14 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 20:58:14 (GMT) |
commit | a54aae068325551bcc70c151b483f1b38ca0c687 (patch) | |
tree | b9e9f9d33b597ea84421d22c19cbbb6f551c90ef /Doc/library | |
parent | 793c14ea2965a1584a7f85aa663d0fd7cfdef629 (diff) | |
download | cpython-a54aae068325551bcc70c151b483f1b38ca0c687.zip cpython-a54aae068325551bcc70c151b483f1b38ca0c687.tar.gz cpython-a54aae068325551bcc70c151b483f1b38ca0c687.tar.bz2 |
Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
and ASCII letter now raise a deprecation warning and will be forbidden in
Python 3.6.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/re.rst | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 0d305d5..8884584 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -438,6 +438,10 @@ three digits in length. .. versionchanged:: 3.3 The ``'\u'`` and ``'\U'`` escape sequences have been added. +.. deprecated-removed:: 3.5 3.6 + Unknown escapes consist of ``'\'`` and ASCII letter now raise a + deprecation warning and will be forbidden in Python 3.6. + .. seealso:: @@ -687,7 +691,7 @@ form. *string* is returned unchanged. *repl* can be a string or a function; if it is a string, any backslash escapes in it are processed. That is, ``\n`` is converted to a single newline character, ``\r`` is converted to a carriage return, and - so forth. Unknown escapes such as ``\j`` are left alone. Backreferences, such + so forth. Unknown escapes such as ``\&`` are left alone. Backreferences, such as ``\6``, are replaced with the substring matched by group 6 in the pattern. For example: @@ -732,6 +736,10 @@ form. .. versionchanged:: 3.5 Unmatched groups are replaced with an empty string. + .. deprecated-removed:: 3.5 3.6 + Unknown escapes consist of ``'\'`` and ASCII letter now raise a + deprecation warning and will be forbidden in Python 3.6. + .. function:: subn(pattern, repl, string, count=0, flags=0) |