pylint -- should I just ignore it sometimes?

Seebs usenet-nospam at seebs.net
Fri Oct 22 12:04:00 EDT 2010


On 2010-10-22, Jean-Michel Pichavant <jeanmichel at sequans.com> wrote:
> Seebs wrote:
>> On 2010-10-21, Jean-Michel Pichavant <jeanmichel at sequans.com> wrote:
>>> list1 = []
>>> for x in theList:
>>>     if x[0] == 4: 
>>>         list1 += x;
>>> return list1

>>> flaggedCells = []
>>> for cell in theBoard:
>>>     if cell[STATUS_VALUE] == FLAGGED:
>>>         flaggedCells += cell
>>> return flaggedCells   

>> The latter is better, but:

> Right, may be there is an even better solution. This is not the point. 
> The point of this example is to show the power of meaningful names in a 
> very basic example. You said it yourself, the latter is better.

But it's a very contrived example, where bad style is held up for admiration
by comparison with atrocious style.  That's not a persuasive argument!

In fact, the "better" example can be massively improved by *shortening*
it, lending weight to my general contention that verbosity for the sake
of feeling like we're making things clearer is not an effective way to
make things clearer.

-s
-- 
Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.



More information about the Python-list mailing list