mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35169: Improve error messages for forbidden assignments. (GH-10342)
This commit is contained in:
parent
6c48bf2d9e
commit
97f1efb606
6 changed files with 140 additions and 96 deletions
|
@ -1865,12 +1865,12 @@ SyntaxError: assignment to yield expression not possible
|
|||
>>> def f(): (yield bar) = y
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
SyntaxError: can't assign to yield expression
|
||||
SyntaxError: cannot assign to yield expression
|
||||
|
||||
>>> def f(): (yield bar) += y
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
SyntaxError: can't assign to yield expression
|
||||
SyntaxError: cannot assign to yield expression
|
||||
|
||||
|
||||
Now check some throw() conditions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue