Package: pyflakes
Version: 0.8.1-1

In Python 3.X, variables defined in list comprehensions don't leak to the surrounding scope, like they did in Python 2.X. Therefore, the warning pyflakes3 emits for the attached test file is a false positive:

$ pyflakes3 test.py
test.py:2: list comprehension redefines 'x' from line 1


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

Kernel: Linux 3.14-2-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-pkg-resources   5.4.1-1
ii  python2.7              2.7.8-3
ii  python3                3.4.1-1
ii  python3-pkg-resources  5.4.1-1
pn  python3:any            <none>
pn  python:any             <none>

--
Jakub Wilk
x = 42
[x for x in [69]]
print(x)

Reply via email to