Message349025
Thanks Guido. The former test cases that the new PR removes are the following:
res = [i := i for i in range(5)]
res = [i := 0 for i, j in [(1, 2), (3, 4)]]
res = [(i := 0, j := 1) for i, j in [(1, 2), (3, 4)]]
res = [(i := i, j := j) for i, j in [(1, 2), (3, 4)]]
res = [(i := j, j := i) for i, j in [(1, 2), (3, 4)]]
These all raise TargetScopeError with the PR applied:
>>> res = [i := i for i in range(5)]
File "<stdin>", line 1
TargetScopeError: named expression cannot rebind comprehension iteration variable
>>> res = [i := 0 for i, j in [(1, 2), (3, 4)]]
File "<stdin>", line 1
TargetScopeError: named expression cannot rebind comprehension iteration variable
>>> res = [(i := 0, j := 1) for i, j in [(1, 2), (3, 4)]]
File "<stdin>", line 1
TargetScopeError: named expression cannot rebind comprehension iteration variable
>>> res = [(i := i, j := j) for i, j in [(1, 2), (3, 4)]]
File "<stdin>", line 1
TargetScopeError: named expression cannot rebind comprehension iteration variable
>>> res = [(i := j, j := i) for i, j in [(1, 2), (3, 4)]]
File "<stdin>", line 1
TargetScopeError: named expression cannot rebind comprehension iteration variable |
|
| Date |
User |
Action |
Args |
| 2019-08-05 04:36:52 | ncoghlan | set | recipients:
+ ncoghlan, gvanrossum, tim.peters, barry, rhettinger, eric.smith, nedbat, steven.daprano, serhiy.storchaka, koobs, willingc, veky, emilyemorehouse, joernheissler, pablogsal, miss-islington, xtreak |
| 2019-08-05 04:36:52 | ncoghlan | set | messageid: <[email protected]> |
| 2019-08-05 04:36:52 | ncoghlan | link | issue35224 messages |
| 2019-08-05 04:36:52 | ncoghlan | create | |
|