]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (#122702)
authorsobolevn <mail@sobolevn.me>
Sun, 11 Aug 2024 21:02:50 +0000 (00:02 +0300)
committerGitHub <noreply@github.com>
Sun, 11 Aug 2024 21:02:50 +0000 (21:02 +0000)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc/reference/lexical_analysis.rst

index 594fc713aa8eddf34c58a1cfa6d4c836040b74c9..635d36537a0678e283843dda3a5c909a2d061cb2 100644 (file)
@@ -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