[Python-apps-team] Bug#757004: pyflakes: incorrectly tracks scope of vars defined in list comprehesions (for Python 3.X)
Jakub Wilk
jwilk at debian.org
Mon Aug 4 11:41:10 UTC 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 34 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20140804/8be16fb0/attachment.py>
More information about the Python-apps-team
mailing list