3ff2d03891
Don't store final, failing value to the loop variable. This fix also makes for .. range a bit more efficient, as it uses less store/load pairs for the loop variable.
9 lines
161 B
Python
9 lines
161 B
Python
i = 'init'
|
|
for i in range(0):
|
|
pass
|
|
print(i) # should not have been modified
|
|
|
|
for i in range(10):
|
|
pass
|
|
print(i) # should be last successful value of loop
|