pylint #4024 W0631 false positive if a "else" clause is defining the loop variable [validation pending]
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" ... | |
priority | normal |
---|---|
type | bug |
done in | <not specified> |
load left | 0.000 |
closed by | #179dfac3bb53 Detect assignments to a loop variable in the else branch of a for statement. |
similar entities
- logilab-astng #3207 filter infered values according to if statement
- pylint #2463 W0631 false positive when we are sure to do at least one iteration
- pylint #9188 Avoidable W0631
- logilab-astng #3531 Type inference on factory classmethod
- logilab-astng #19641 "maximum recursion depth exceeded" messages w/ python 2.6
[see all]
Comments
-
2008/09/17 09:31, written by eanclin
probably a astng pb
add comment