[3.14] gh-130077: Properly match full soft keywords in the parser (GH-135317) (#135348)

gh-130077: Properly match full soft keywords in the parser (GH-135317)
(cherry picked from commit ff2b5f40c2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-06-11 03:01:37 +02:00 committed by GitHub
parent 4b96a34978
commit 77c4b5d413
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View file

@ -382,6 +382,13 @@ SyntaxError: invalid syntax
Traceback (most recent call last):
SyntaxError: invalid syntax
# But prefixes of soft keywords should
# still raise specialized errors
>>> (mat x)
Traceback (most recent call last):
SyntaxError: invalid syntax. Perhaps you forgot a comma?
From compiler_complex_args():
>>> def f(None=1):