Pylint prefers list comprehension over filter...

Christopher Reimer christopher_reimer at icloud.com
Sat May 7 18:01:22 EDT 2016


On 5/7/2016 2:22 PM, Chris Angelico wrote:
> On Sun, May 8, 2016 at 5:17 AM, Christopher Reimer
> <christopher_reimer at icloud.com> wrote:
>> Since the code I'm working on is resume fodder (i.e., "Yes, I code in 
>> Python! Check out my chess engine code on GitHub!"), I want it to be 
>> as Pythonic and PEP8-compliant as possible. That includes scoring 
>> 10/10 with pylint. Never know when an asshat hiring manager would 
>> reject my resume out of hand because my code fell short with pylint. 
>> For my purposes, I'm using the list comprehension over filter to keep 
>> pylint happy. 
> Wrong thinking. Make it Pythonic - but don't concern yourself with
> pylint's final score. Read pylint's output and learn from it, but
> don't treat a 10/10 score as the ultimate in ratings, because it just
> isn't.
I agree with that in principle. But...
> Also, be sure you read this part of PEP 8:
>
> https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds
Recruiters and hiring managers *are* hobgoblins with with little minds. 
And definitely not PEP8-complaint. :)

When I was out of work for two years (2009-10), underemployed for six 
months (working 20 hours per month), and filed for Chapter Seven 
bankruptcy in 2011, I  only had 20 job interviews during that time. That 
was a learning experience. I did everything possible to present myself 
and my resume as perfectly as possible. When I had another bout of 
unemployment that lasted eight months (2013-14), I had 60 job interviews 
and three job offers to pick from at the end. Of course, that was for IT 
support contracts. Maybe programming jobs will have fewer hobgoblins.

Thank you,

Chris R.



More information about the Python-list mailing list