bpo-45727: Make the syntax error for missing comma more consistent (GH-29427)

This commit is contained in:
Pablo Galindo Salgado 2021-11-19 23:11:57 +00:00 committed by GitHub
parent c8c21bdd19
commit 546cefcda7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 24 deletions

View file

@ -233,6 +233,7 @@ class ExceptionTests(unittest.TestCase):
check('[file for\n str(file) in []]', 2, 2)
check("ages = {'Alice'=22, 'Bob'=23}", 1, 16)
check('match ...:\n case {**rest, "key": value}:\n ...', 2, 19)
check("a b c d e f", 1, 1)
# Errors thrown by compile.c
check('class foo:return 1', 1, 11)