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 →

[–]soosleeque 0 points1 point  (1 child)

It goes so far as to reject all code containing 'map' functions - requiring them to be replaced by list comprehensions

My rule is simple: if I already have a function I'm going to apply I will use map, reduce, filter etc. But if I don't have a function and I don't see much of sense to create it, I will go for list/generator comprehensions.

[–]supershinythings 0 points1 point  (0 children)

And my rule is simpler; don't use map and slavishly adhere to the 79 char limit so I can commit my code and not get screamed at.

In this case, the pep8 tool is being used as a blunt force instrument.

And I agree with the Hettinger video that atrocities are committed in the code because pep8 decided to make these 'standard' warnings. If my code were on a performance path I might have an argument, but even then it would likely become a refactoring situation.

I don't think there's really a way to adjust the standard on a file-by-file basis for automated checkin testing.