Skip to content

Commit

Permalink
[3.11] gh-103360: Add link in stdtypes.rst to escape sequences in lex…
Browse files Browse the repository at this point in the history
…ical_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]>
  • Loading branch information
3 people authored Feb 2, 2024
1 parent 08133e4 commit df5381d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
5 changes: 5 additions & 0 deletions Doc/reference/lexical_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit df5381d

Please sign in to comment.