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


Groups > comp.lang.python > #108305

Re: Pylint prefers list comprehension over filter...

From Radek Holý <Radek1@holych.org>
Newsgroups comp.lang.python
Subject Re: Pylint prefers list comprehension over filter...
Date 2016-05-08 00:04 +0200
Message-ID <mailman.480.1462658686.32212.python-list@python.org> (permalink)
References <572BF2BF.6000000@icloud.com> <1462498631.232041.599637409.25D91C08@webmail.messagingengine.com> <572E3F53.5010703@icloud.com> <CAPtibM4qi7Ggm3GNOKerk7YoX6x8DRNzRXvXDRfMSm8sUxUB2g@mail.gmail.com>

Show all headers | View raw


2016-05-07 21:17 GMT+02:00 Christopher Reimer <christopher_reimer@icloud.com
>:

> On 5/5/2016 6:37 PM, Stephen Hansen wrote:
>
>> On Thu, May 5, 2016, at 06:26 PM, Christopher Reimer wrote:
>>
>>> Which is one is correct (Pythonic)? Or does it matter?
>>>
>> First, pylint is somewhat opinionated, and its default options shouldn't
>> be taken as gospel. There's no correct: filter is fine.
>>
>
> 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.
>
>
> Thank you,
>
> Chris R.
> --
> https://mail.python.org/mailman/listinfo/python-list
>


Don't forget that you can also place a pylintrc file (with some reasonable
comments) into the repository or use the other means to disable selected
rules....

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


Thread

Re: Pylint prefers list comprehension over filter... Radek Holý <Radek1@holych.org> - 2016-05-08 00:04 +0200

csiph-web