pylint woes

DFS nospam at dfs.com
Sun May 8 17:16:56 EDT 2016


On 5/8/2016 1:25 PM, Steven D'Aprano wrote:
> On Sun, 8 May 2016 02:10 pm, DFS wrote:


>>>> +-------------------------+------------+
>>>> |bad-whitespace           |65          | mostly because I line up =
>>>>                                           signs:
>>>>                                           var1  = value
>>>>                                           var10 = value
>>>
>>> Yuck. How much time do you waste aligning assignments whenever you add or
>>> delete or edit a variable?
>>
>> Lots.  It takes hours to add or delete 3 whitespaces.
>
> Yes, you're right. It takes you five minutes to line everything up the first
> time. Then you change the name of a variable, and now you have to realign
> everything -- that's an extra minute gone. Then you add another line, and
> have to realign again, another couple of minutes. Over the lifespan of the
> program, you'll probably have spent multiple hours wasting time realigning
> blocks of assignments.


Do you actually believe what you just wrote?

If yes, you should quit programming.

If not, why did you say it?







>>>> +-------------------------+------------+
>>>> |trailing-whitespace      |59          | heh!
>>>> +-------------------------+------------+
>>>> |multiple-statements      |23          | do this to save lines.
>>>>                                           Will continue doing it.
>>>
>>> Why? Do you think that there's a world shortage of newline characters? Is
>>> the Enter key on your keyboard broken?
>>
>> I do it because I like it.
>>
>> if verbose: print var
>>
>> python doesn't complain.
>
> Hmmm. Well, that's not too bad. I thought you mean something like:
>
> addr = getaddress(key); addr[2] = addr.upper(); print addr
>
> which is just horrible.


I was surprised to see the PEP8 guide approve of:

"Yes: if x == 4: print x, y; x, y = y, x"

https://www.python.org/dev/peps/pep-0008/#pet-peeves










More information about the Python-list mailing list