[Python-projects] pylint lambda bug

Mark Flacy mflacy1 at comcast.net
Sat Oct 7 10:26:46 CEST 2006


Greetings.

Running pylint over the attached file gives these results:

pylint -f parseable bug.py
bug.py:1: [C] Missing required attribute "__revision__"
bug.py:6: [E, buggy.<lambda>] Using variable 'a' before assignment
bug.py:6: [E, buggy.<lambda>] Using variable 'b' before assignment


I'm running...

/tmp$ pylint --version
pylint 0.12.1,
astng 0.16.1, common 0.19.2
Python 2.4.3 (#1, Oct  2 2006, 11:23:48)
[GCC 3.3.6]


The release notes in the mailing list stated that __revision__ was no longer required, so I am surprised to see that message.  The lambda error is from a lambda construct of...

lambda (a, b): a != b

...but if I were to change that bit of code to be...

lambda (x): x[0] != x[1]

...then pylint will be quiet about the lambda expression.

Thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.py
Type: text/x-python
Size: 340 bytes
Desc: not available
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20061007/50a7fe85/bug-0002.py


More information about the Python-Projects mailing list