mirror of
https://github.com/python/cpython.git
synced 2025-10-29 04:35:05 +00:00
[3.13] gh-130077: Properly match full soft keywords in the parser (GH-135317) (#135399)
* [3.13] 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>
* Remove line the main-branch commit removed
---------
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
55f8fe548a
commit
235d380c4c
3 changed files with 11 additions and 1 deletions
|
|
@ -352,6 +352,13 @@
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue