https://github.com/python/cpython/commit/284ab76d4ecf32c486f99237e0024ff3a57fd9bf
commit: 284ab76d4ecf32c486f99237e0024ff3a57fd9bf
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-09-16T16:56:17+03:00
summary:

[3.14] gh-110936: Reorder string literal definition in Lexical Analysis 
(GH-138063) (#138373)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Doc/reference/lexical_analysis.rst

diff --git a/Doc/reference/lexical_analysis.rst 
b/Doc/reference/lexical_analysis.rst
index 83db7646f1673f..f93666dcdc8f44 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -628,10 +628,10 @@ to indicate that an ending quote ends the literal.
    STRING:          [`stringprefix`] (`stringcontent`)
    stringprefix:    <("r" | "u" | "b" | "br" | "rb"), case-insensitive>
    stringcontent:
-      | "'" ( !"'" `stringitem`)* "'"
-      | '"' ( !'"' `stringitem`)* '"'
       | "'''" ( !"'''" `longstringitem`)* "'''"
       | '"""' ( !'"""' `longstringitem`)* '"""'
+      | "'" ( !"'" `stringitem`)* "'"
+      | '"' ( !'"' `stringitem`)* '"'
    stringitem:      `stringchar` | `stringescapeseq`
    stringchar:      <any `source_character`, except backslash and newline>
    longstringitem:  `stringitem` | newline

_______________________________________________
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]

Reply via email to