] > pylint #4024: W0631 false positive if a "else" clause is defining the loop variable (Logilab.org)

#4024: W0631 false positive if a "else" clause is defining the loop variable [open]

prioritynormal
typebug
loadnot specified
load leftnot 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" ...