cpython/Misc/NEWS.d/next/Core and Builtins/2019-08-05-14-22-59.bpo-377...

8 lines
334 B
ReStructuredText

:pep:`572`: As described in the PEP, assignment expressions now raise
:exc:`SyntaxError` when their interaction with comprehension scoping results
in an ambiguous target scope.
The ``TargetScopeError`` subclass originally proposed by the PEP has been
removed in favour of just raising regular syntax errors for the disallowed
cases.