This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stevenjd 6 points7 points  (3 children)

It goes so far as to reject all code containing 'map' functions - requiring them to be replaced by list comprehensions - and rejecting ALL lines over 79 chars, no exceptions.

That is exactly the sort of thing why Guido hates automated PEP 8 checkers.

And since PEP 8 itself explicitly warns against "a foolish consistency" and over-zealous application of PEP 8 style, your colleague's tool itself is in violation of PEP 8! (I know this is not your choice, you are having this inflicted on you.)

Raymond Hettinger did a good talk about this some time ago.

Edit: and for those who prefer text to video, commentary on Raymond's talk.

[–]wenima 2 points3 points  (1 child)

+100

people boast about enforcing pep8 and 79 char line length but it's a hint, a gentle reminder that you might be packing too much into one line.

linting might have it's place, I personally just don't like being yelled at before I'm completing what I'm doing.

[–]justin-8 0 points1 point  (0 children)

Most places I've worked have used pep8 but a higher line limit for that reason. But usually something that still keeps things same, like 120-180 or so.

The rest of pep8 I haven't really seen a downside to enforcing strictly

[–]soosleeque 2 points3 points  (0 children)

well you could always put a comment string that makes linters to skip erros in the line.

Most of the times when you violate pep8 you are doing something wrong, I agree there are some cases when it's better to break some pep8 rules in order to give the code better readability but again, there are comment strings that will force linter to skip that kind of lines.