]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merge branch 'master' into fix-issue-30688 2261/head
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Nov 2017 17:17:59 +0000 (19:17 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Nov 2017 17:17:59 +0000 (19:17 +0200)
1  2 
Doc/library/re.rst
Lib/sre_parse.py
Lib/test/test_re.py

index 9fafc0f462d599a2de9fc77afd5371e064ea9774,8c15462871b8f152ad8523427ba15b7052c8048b..ca09a91c0d259a70edcc8095e2d2b50e9b0b1890
@@@ -443,15 -467,15 +467,15 @@@ character ``'$'``
  Most of the standard escapes supported by Python string literals are also
  accepted by the regular expression parser::
  
-    \a      \b      \f      \n      \N
-    \r      \t      \u      \U
-    \v      \x      \\
+    \a      \b      \f      \n
 -   \r      \t      \u      \U
 -   \v      \x      \\
++   \N      \r      \t      \u
++   \U      \v      \x      \\
  
  (Note that ``\b`` is used to represent word boundaries, and means "backspace"
  only inside character classes.)
  
 -``'\u'`` and ``'\U'`` escape sequences are only recognized in Unicode
 +``'\u'``, ``'\U'``, and ``'\N'`` escape sequences are only recognized in Unicode
- patterns.  In bytes patterns they are not treated specially.
+ patterns.  In bytes patterns they are errors.
  
  Octal escapes are included in a limited form.  If the first digit is a 0, or if
  there are three octal digits, it is considered an octal escape. Otherwise, it is
Simple merge
Simple merge