mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-88535: Improve syntax error for wrongly closed strings (#26633)
This commit is contained in:
parent
56eda25633
commit
6fb5138776
6 changed files with 1098 additions and 930 deletions
|
@ -312,6 +312,12 @@ SyntaxError: did you forget parentheses around the comprehension target?
|
|||
Traceback (most recent call last):
|
||||
SyntaxError: did you forget parentheses around the comprehension target?
|
||||
|
||||
# Incorrectly closed strings
|
||||
|
||||
>>> "The interesting object "The important object" is very important"
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: invalid syntax. Is this intended to be part of the string?
|
||||
|
||||
# Missing commas in literals collections should not
|
||||
# produce special error messages regarding missing
|
||||
# parentheses, but about missing commas instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue