no detection of undefined parameters in else branches
Bug #1597279 reported by
Wilfred Hughes
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
New
|
Undecided
|
Unassigned |
Bug Description
pyflakes correctly warns on using x before defining it in the if branch:
def bar(a):
pass
def x_is_bad_if():
if False:
x = bar(x)
else:
x = bar(1)
return x
However, no warning is generated for the else branch:
def bar(a):
pass
def x_is_bad_else():
if False:
x = bar(1)
else:
x = bar(x)
return x
To post a comment you must log in.