Package: pyflakes
Version: 0.6.1-1~exp1
Severity: normal

Variables defined in generator expressions (unlike those defined in list comprehensions) don't leak to the surrounding scope. For example, for the attached code pyflakes should have emitted:

test.py:2: undefined name 'x'

Instead it incorrectly emits:

test.py:3: list comprehension redefines 'x' from line 1


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.7-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pyflakes depends on:
ii  python  2.7.3-4

--
Jakub Wilk
(x for x in [])
x
[x for x in []]

Reply via email to