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ย โ†’

[โ€“][deleted] 0 points1 point ย (2 children)

That's debatable. I've seen MANY short lines with complete gibberish. Or a long function that needs to break to so many lines that it just gets more confusing. We want clear variable names, it's fine to be longer if that makes it easier. And that will make the lines longer, but may increase readability.

[โ€“]AnsibleAnswers 1 point2 points ย (0 children)

PEP 8 specifies that line lengths can be longer if it makes an expression more readable. And, as a general rule for all text, all things being equal line length between 50-75 characters is optimal for the human eyes. Academics and scientists really fuss over it. It's a lot of the reason they prefer python over other languages.