using del in if clause confuses pyflakes
Bug #885140 reported by
David
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
Wishlist
|
Adi Roiban |
Bug Description
code:
-------
test = True
if False:
del(test)
assert(test)
-------
pyflakes complains:
[...].py:4: undefined name 'test'
i guess this may be too hard for a static analysier, in which case, how about
-------
test = True
if False:
del(test)
else:
assert(test)
-------
where the usage is in a different else branch to the del
output:
[...].py:5: undefined name 'test'
Changed in pyflakes: | |
assignee: | David (david-szotten) → nobody |
Changed in pyflakes: | |
status: | In Progress → Fix Committed |
Changed in pyflakes: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
You're welcome to give it a try.