#4024: W0631 false positive if a "else" clause is defining the loop variable [open]
#4024 - latest update on 2008/10/01, created on 2007/07/13 by Sylvain Thenault
| priority | normal |
| type | bug |
| load | not specified |
| load left | not specified |
not planned The following code:
for x in []:
pass
else:
x = 3
print x
will cause W0631 (Using possibly undefined loop variable 'x') on the last line, even tho x is not "possibly undefined" ...
|
| |
Comments
(add comment)