False positive "undefined name" in comprehensions
Bug #1501359 reported by
Micro Alex
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Invalid
|
Undecided
|
Unassigned |
Bug Description
$ cat test.py
print list(
map(
lambda x: '{} {}'.format(var, x),
['orange', 'apple']
)
for var in ['an', 'example']
)
$ pyflakes test.py
test.py:3: undefined name 'var'
the variable "var" is available in the lambda expression, so I believe this is a false positive for "undefined name" error.
Edit:
sorry, this was my fault, after I updated pyflakes to the latest version, the issue has gone.
Changed in pyflakes: | |
status: | New → Invalid |
description: | updated |
To post a comment you must log in.