Pylint prefers list comprehension over filter...

Steven D'Aprano steve at pearwood.info
Sun May 8 08:02:50 EDT 2016


On Sun, 8 May 2016 08:01 am, Christopher Reimer wrote:

> On 5/7/2016 2:22 PM, Chris Angelico wrote:

>> 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. :)

Do you think that recruiters and hiring managers read your code at all, let
alone that they read it will an eye to PEP 8 compliance?

No recruiter[1] will do this. No recruiter will even know what PEP 8 is.
They're looking for technical buzzwords ("ten years experience with
Django"), they aren't qualified to judge whether your Django code is good,
bad or indifferent. That's up to the client.

A hiring manager with a technical background might, once you are in
consideration for the job. More likely they will delegate any judgement to
a technical manager, or programmer, who may or may not be a hobgoblin with
a little mind. There are plenty of programmers who are obsessive about
following PEP 8 even when it makes the code worse:

    mywidget.component['key'] = (mywidget.grippley.count_item(spam or eggs)
                                 + 1)


(I've met plenty of technical people who are opinionated and badly informed,
not just managers. Just last week, I was told by one programmer that
Mersenne Twister, the default RNG used by Python, is well-known to be
biased, and that "everybody knows" not to use it to choose an item from a
list because it is documented "everywhere" as being more likely to choose
the first or the last item than any of the others.)







[1] Sweeping generalisation. In a world of 7 billion people, there's
probably one or two exceptions somewhere.



-- 
Steven




More information about the Python-list mailing list