mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
This commit is contained in:
parent
a94461d718
commit
70f415fb8b
4 changed files with 9 additions and 2 deletions
|
@ -1663,6 +1663,9 @@ def func2():
|
|||
for paren in "([{":
|
||||
self._check_error(paren + "1 + 2", f"\\{paren}' was never closed")
|
||||
|
||||
for paren in "([{":
|
||||
self._check_error(f"a = {paren} 1, 2, 3\nb=3", f"\\{paren}' was never closed")
|
||||
|
||||
for paren in ")]}":
|
||||
self._check_error(paren + "1 + 2", f"unmatched '\\{paren}'")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue