mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-40334: Correctly identify invalid target in assignment errors (GH-20076)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
7ba1f75f3f
commit
16ab07063c
10 changed files with 137 additions and 45 deletions
|
@ -1921,7 +1921,7 @@ SyntaxError: cannot assign to yield expression
|
|||
>>> def f(): (yield bar) += y
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
SyntaxError: cannot assign to yield expression
|
||||
SyntaxError: 'yield expression' is an illegal expression for augmented assignment
|
||||
|
||||
|
||||
Now check some throw() conditions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue