blob: 56617df49bada0248f294b8b44f11b6c5a1f629a (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
 | # test assigning to iterator within the loop
for i in range(2):
    print(i)
    i = 2
# test assigning to range parameter within the loop
# (since we optimise for loops, this needs checking, currently it fails)
n = 2
for i in range(n):
    print(i)
    n = 0
 |