Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108304

Re: Pylint prefers list comprehension over filter...

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Christopher Reimer <christopher_reimer@icloud.com>
Newsgroups comp.lang.python
Subject Re: Pylint prefers list comprehension over filter...
Date Sat, 07 May 2016 15:01:22 -0700
Lines 33
Message-ID <mailman.479.1462658486.32212.python-list@python.org> (permalink)
References <572BF2BF.6000000@icloud.com> <1462498631.232041.599637409.25D91C08@webmail.messagingengine.com> <572E3F53.5010703@icloud.com> <CAPTjJmo29JkU=Fyoe2oMk5q5M9pxTF8aOki0Yx989W163k9Qhg@mail.gmail.com> <572E65B2.4010305@icloud.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de 9aJtD+mkYfDjyoMk85WcnQuRGBlmAzxYo/a49yUyN7qQ==
Return-Path <christopher_reimer@icloud.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.135
X-Spam-Level *
X-Spam-Evidence '*H*': 0.73; '*S*': 0.00; 'reject': 0.05; 'subject:skip:c 10': 0.07; 'recruiters': 0.09; 'output': 0.13; '2016': 0.16; 'happy.': 0.16; "isn't.": 0.16; 'pythonic': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:pep-0008': 0.16; 'wrote:': 0.16; 'programming': 0.22; 'am,': 0.23; 'chapter': 0.23; 'header:User-Agent:1': 0.26; 'subject:list': 0.26; 'chris': 0.26; 'received:17': 0.27; 'concern': 0.29; 'filed': 0.29; 'pep': 0.29; 'url:peps': 0.29; "i'm": 0.30; 'code': 0.30; '(i.e.,': 0.30; 'another': 0.32; 'received:10.0.0': 0.32; 'maybe': 0.33; 'url:python': 0.33; 'purposes,': 0.33; 'received:10.0': 0.34; 'list': 0.34; 'filter': 0.35; 'url:dev': 0.35; 'but': 0.36; 'url:org': 0.36; 'possible.': 0.36; 'possible': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'agree': 0.37; 'hiring': 0.37; 'wrong': 0.38; 'thank': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.40; 'header:MIME-version:1': 0.60; 'skip:u 10': 0.61; 'engine': 0.62; 'per': 0.62; 'charset:windows-1252': 0.62; 'managers': 0.63; 'hours': 0.65; 'six': 0.65; 'experience.': 0.66; 'jobs': 0.67; 'eight': 0.72; 'treat': 0.72; 'yourself': 0.73; 'score': 0.76; 'hand': 0.82; '"yes,': 0.84; 'header:In-reply-to:1': 0.84; 'score.': 0.84; 'subject:over': 0.84; 'ultimate': 0.93
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2016-05-07_14:,, signatures=0
X-Proofpoint-Spam-Details rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1605070329
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
In-reply-to <CAPTjJmo29JkU=Fyoe2oMk5q5M9pxTF8aOki0Yx989W163k9Qhg@mail.gmail.com>
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=4d515a; t=1462658483; bh=1MkaaXqqyL+y4TZustmrrNqdn8OnYJpUgpVE21b6AB4=; h=Subject:To:From:Message-id:Date:MIME-version:Content-type; b=od2oFXlUzXcWncrfp8KJfEH6Bkw2ZgsBClqr9L/gfs6a65j40Z/jzLinz292WffaD /bvixjiCZna2oxt40RBTeU+hK8u+lt106w/1bCbQuyADruaSqbABn3rrbYzfZ6U6mG BFiCZfzFQvPR8Oa71Gg7n4wKh+SFoLjk7cjOGZ6leuqMAoiF4VrZ9xMk1Or3RS4wjF LDD+DQBFrKAqq7Eb/1f4HhiYi50XFScDvallH9Xa2ZdJqfO8nrcNK5QsiOUZJ7/iP0 DnOD4gGlaSBLpzx5+gp1E/d0SAoF4XxgQDwZ1Rx8+eRhkUmcYvc3NANEXS15X1fMUz gW7jZti5aJTpw==
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <572E65B2.4010305@icloud.com>
X-Mailman-Original-References <572BF2BF.6000000@icloud.com> <1462498631.232041.599637409.25D91C08@webmail.messagingengine.com> <572E3F53.5010703@icloud.com> <CAPTjJmo29JkU=Fyoe2oMk5q5M9pxTF8aOki0Yx989W163k9Qhg@mail.gmail.com>
Xref csiph.com comp.lang.python:108304

Show key headers only | View raw


On 5/7/2016 2:22 PM, Chris Angelico wrote:
> On Sun, May 8, 2016 at 5:17 AM, Christopher Reimer
> <christopher_reimer@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.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Pylint prefers list comprehension over filter... Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-07 15:01 -0700
  Re: Pylint prefers list comprehension over filter... Steven D'Aprano <steve@pearwood.info> - 2016-05-08 22:02 +1000
    Re: Pylint prefers list comprehension over filter... Christopher Reimer <christopher_reimer@icloud.com> - 2016-05-08 09:57 -0700

csiph-web