According to PEP 572, section Scope of the target, the following examples of assignment expressions should be invalid and raise TargetScopeError
.
[i := i+1 for i in range(5)]
Python 3.8.0a1 (tags/v3.8.0a1:e75eeb00b5, Feb 3 2019, 20:47:39) [MSC v.1916 64 bit (AMD64)] on win32