Package: pyflakes
Version: 0.4.0-1
Severity: normal

$ cat test.py import encodings.cp1250
import encodings as e
print e.cp1250

$ python test.py <module 'encodings.cp1250' from '/usr/lib/python2.6/encodings/cp1250.pyc'>

$ pyflakes test.py test.py:1: 'encodings' imported but unused

This is of course false positive; if I remove import from line 1, I get:

$ python test.py Traceback (most recent call last):
  File "test.py", line 2, in <module>
    print e.cp1250
AttributeError: 'module' object has no attribute 'cp1250'

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to