mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Ensure that early = are not matched by the parser as invalid comparisons (GH-25375)
This commit is contained in:
parent
c1a66bdd6f
commit
d9151cb453
3 changed files with 423 additions and 319 deletions
|
@ -863,6 +863,11 @@ leading to spurious errors.
|
|||
Traceback (most recent call last):
|
||||
SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='?
|
||||
|
||||
Ensure that early = are not matched by the parser as invalid comparisons
|
||||
>>> f(2, 4, x=34); {1,2 a}
|
||||
Traceback (most recent call last):
|
||||
SyntaxError: invalid syntax
|
||||
|
||||
Make sure that the old "raise X, Y[, Z]" form is gone:
|
||||
>>> raise X, Y
|
||||
Traceback (most recent call last):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue