mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
mention \N escapes more tersely
This commit is contained in:
parent
7fb2983532
commit
4db797b1cf
1 changed files with 2 additions and 2 deletions
|
@ -443,14 +443,14 @@ character ``'$'``.
|
||||||
Most of the standard escapes supported by Python string literals are also
|
Most of the standard escapes supported by Python string literals are also
|
||||||
accepted by the regular expression parser::
|
accepted by the regular expression parser::
|
||||||
|
|
||||||
\a \b \f \n \N{name}
|
\a \b \f \n \N
|
||||||
\r \t \u \U
|
\r \t \u \U
|
||||||
\v \x \\
|
\v \x \\
|
||||||
|
|
||||||
(Note that ``\b`` is used to represent word boundaries, and means "backspace"
|
(Note that ``\b`` is used to represent word boundaries, and means "backspace"
|
||||||
only inside character classes.)
|
only inside character classes.)
|
||||||
|
|
||||||
``'\u'``, ``'\U'``, and ``'\N{name}'`` 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 not treated specially.
|
||||||
|
|
||||||
Octal escapes are included in a limited form. If the first digit is a 0, or if
|
Octal escapes are included in a limited form. If the first digit is a 0, or if
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue