https://github.com/python/cpython/commit/df5381d8b6eebf47a5469e66d4d4554683988bbc commit: df5381d8b6eebf47a5469e66d4d4554683988bbc branch: 3.11 author: Miss Islington (bot) <[email protected]> committer: terryjreedy <[email protected]> date: 2024-02-02T21:06:35Z summary:
[3.11] gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst (GH-103638) (#114908) (cherry picked from commit d29f57f6036353b4e705a42637177442bf7e07e5) Co-authored-by: Justin Williams <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]> files: M Doc/library/stdtypes.rst M Doc/reference/lexical_analysis.rst diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 732c3145c878cb..db9815733fc870 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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` diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index fa7608f94c385a..384b854a987126 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -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: _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
