Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#312 generator comprehension causes omitting undefined variables

0.8.19
open
nobody
None
5
2012-06-19
2012-06-19
Anonymous
No

If any generator comprehension is used in the body of function, two bugs are present.

1. No undefined variables are reported.

2. All function parameters are reported as unused.
(Only unused local variables other than function parameters are reported correctly.)

Simplified example:

def f(a):
_ _ """Bugs:
_ _ _ _ False message: "Parameter (a) not used"
_ _ _ _ Missing message: "No global (b) found"
_ _ """
_ _ print a, b
_ _ return sum(x for x in [1])

Discussion