mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #27030: Unknown escapes in re.sub() replacement template are allowed
again. But they still are deprecated and will be disabled in 3.7.
This commit is contained in:
parent
b0f75c520e
commit
53c53ea4c5
5 changed files with 16 additions and 5 deletions
|
@ -758,7 +758,12 @@ form.
|
|||
Unmatched groups are replaced with an empty string.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Unknown escapes consisting of ``'\'`` and an ASCII letter now are errors.
|
||||
Unknown escapes in *pattern* consisting of ``'\'`` and an ASCII letter
|
||||
now are errors.
|
||||
|
||||
.. deprecated-removed:: 3.5 3.7
|
||||
Unknown escapes in *repl* consist of ``'\'`` and ASCII letter now raise
|
||||
a deprecation warning and will be forbidden in Python 3.7.
|
||||
|
||||
|
||||
.. function:: subn(pattern, repl, string, count=0, flags=0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue