Files
openide/python/resources/inspectionDescriptions/PyAssignmentToLoopOrWithParameterInspection.html
T

19 lines
477 B
HTML

<html>
<body>
Checks for cases when you rewrite loop variable with inner loop
<pre style="font-family: monospace">
for i in xrange(5):
for i in xrange(20, 25):
print("Inner", i)
print("Outer", i)
</pre>
It also warns you if variable declared in <code>with</code> statement is redeclared inside of statement body:
<pre style="font-family: monospace">
with open("file") as f:
f.read()
with open("file") as f:
</pre>
</body>
</html>