Pylint prefers list comprehension over filter...
Christopher Reimer
christopher_reimer at icloud.com
Sat May 7 15:17:39 EDT 2016
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.
More information about the Python-list
mailing list