diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-08-11 21:20:07 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-11 21:20:07 (GMT) |
| commit | 1788eb786b1606d28f0e7b99197c9bb32733cfe5 (patch) | |
| tree | 04e807ca4fac2d2dc661f404083a75cff7540008 | |
| parent | ee9818bdbb01a8dd310b30d358995dfcd5dd0ce5 (diff) | |
| download | cpython-1788eb786b1606d28f0e7b99197c9bb32733cfe5.zip cpython-1788eb786b1606d28f0e7b99197c9bb32733cfe5.tar.gz cpython-1788eb786b1606d28f0e7b99197c9bb32733cfe5.tar.bz2 | |
[3.13] gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702) (#122914)
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702)
(cherry picked from commit ea70439bd2b5a1c881342646f30942f527f61373)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
| -rw-r--r-- | Doc/reference/lexical_analysis.rst | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index 594fc71..635d365 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -503,11 +503,10 @@ must be expressed with escapes. single: r"; raw string literal Both string and bytes literals may optionally be prefixed with a letter ``'r'`` -or ``'R'``; such strings are called :dfn:`raw strings` and treat backslashes as -literal characters. As a result, in string literals, ``'\U'`` and ``'\u'`` -escapes in raw strings are not treated specially. Given that Python 2.x's raw -unicode literals behave differently than Python 3.x's the ``'ur'`` syntax -is not supported. +or ``'R'``; such constructs are called :dfn:`raw string literals` +and :dfn:`raw bytes literals` respectively and treat backslashes as +literal characters. As a result, in raw string literals, ``'\U'`` and ``'\u'`` +escapes are not treated specially. .. versionadded:: 3.3 The ``'rb'`` prefix of raw bytes literals has been added as a synonym |
