Skip to content

Commit df5381d

Browse files
miss-islingtonjuswilterryjreedy
authored
[3.11] gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst (GH-103638) (#114908)
(cherry picked from commit d29f57f) Co-authored-by: Justin Williams <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 08133e4 commit df5381d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ between them will be implicitly converted to a single string literal. That
14881488
is, ``("spam " "eggs") == "spam eggs"``.
14891489

14901490
See :ref:`strings` for more about the various forms of string literal,
1491-
including supported escape sequences, and the ``r`` ("raw") prefix that
1491+
including supported :ref:`escape sequences <escape-sequences>`, and the ``r`` ("raw") prefix that
14921492
disables most escape sequence processing.
14931493

14941494
Strings may also be created from other objects using the :class:`str`

Doc/reference/lexical_analysis.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ retained), except that three unescaped quotes in a row terminate the literal. (
541541
single: \u; escape sequence
542542
single: \U; escape sequence
543543

544+
.. _escape-sequences:
545+
546+
Escape sequences
547+
^^^^^^^^^^^^^^^^
548+
544549
Unless an ``'r'`` or ``'R'`` prefix is present, escape sequences in string and
545550
bytes literals are interpreted according to rules similar to those used by
546551
Standard C. The recognized escape sequences are:

0 commit comments

Comments
 (0)