]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 2 Feb 2024 21:06:35 +0000 (22:06 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2024 21:06:35 +0000 (21:06 +0000)
(cherry picked from commit d29f57f6036353b4e705a42637177442bf7e07e5)

Co-authored-by: Justin Williams <97240811+juswil@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc/library/stdtypes.rst
Doc/reference/lexical_analysis.rst

index 732c3145c878cb3e1eec634b0d5d071f5d44240d..db9815733fc870214c97cad34753a1aecf413aa2 100644 (file)
@@ -1488,7 +1488,7 @@ between them will be implicitly converted to a single string literal. That
 is, ``("spam " "eggs") == "spam eggs"``.
 
 See :ref:`strings` for more about the various forms of string literal,
-including supported escape sequences, and the ``r`` ("raw") prefix that
+including supported :ref:`escape sequences <escape-sequences>`, and the ``r`` ("raw") prefix that
 disables most escape sequence processing.
 
 Strings may also be created from other objects using the :class:`str`
index fa7608f94c385a71423dffc534f66495df345cb5..384b854a98712686dfd908b2328b453222628eb3 100644 (file)
@@ -541,6 +541,11 @@ retained), except that three unescaped quotes in a row terminate the literal.  (
    single: \u; escape sequence
    single: \U; escape sequence
 
+.. _escape-sequences:
+
+Escape sequences
+^^^^^^^^^^^^^^^^
+
 Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string and
 bytes literals are interpreted according to rules similar to those used by
 Standard C.  The recognized escape sequences are: