diff --git a/tests/basics/for3.py b/tests/basics/for3.py new file mode 100644 index 000000000..ffa1be244 --- /dev/null +++ b/tests/basics/for3.py @@ -0,0 +1,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