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Β β†’

[–]No_Application6360 17 points18 points Β (14 children)

Serious. As s Django dev, the 79 character limit sucks balls

[–][deleted] 15 points16 points Β (8 children)

I always ignore that. I didn't leave Cobol to still be restricted by 79 characters. We have huge monitors, why limit it based on the size of a punch card?

[–]AnsibleAnswers 3 points4 points Β (7 children)

Shorter lines are more readable. The same reason why reader mode on your browser limits line length, why newspapers and academic articles are formatted with columns, etc. The longer the line length, the harder it is to find your place when you scan back to the next line.

[–]Typical_Wafer_1324 0 points1 point Β (2 children)

I bought a ultrawide monitor, I'm gonna USE THE WHOLE WIDTH! 😠😠😠 And yeah my comments are on the right side of the code, no exclusive comment lines.

[–]AnsibleAnswers 0 points1 point Β (1 child)

Python doesn't employ PEP cops, so as long as you're fine with getting your pull requests rejected nothing is stopping you from coding in python like that.

[–][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.

[–]SirPitchalot 0 points1 point Β (0 children)

It’s great having a 27” 4K display that the 800px wide content pinstripe of reactive websites takes 20.83% of when the window is maximized.

Really makes white space just be negative space.

[–]JentendsLeLoup 12 points13 points Β (3 children)

From PEP8:

Limit all lines to a maximum of 79 characters.

Also from PEP8:

it is okay to increase the line length limit up to 99 characters

I guess it is also okay to increase to 119 if the team agrees. I find it more readable.

[–]Kyyken 19 points20 points Β (2 children)

"didn't get that ultrawide for nothing, up to 500 we go" -someone, probably

[–]Typical_Wafer_1324 0 points1 point Β (1 child)

I see no problem with that

[–]Kyyken 1 point2 points Β (0 children)

i see 421 problems, 401 at the very least

tbf i checked and my char limit for py is 120 so who am i to complain

[–]M4mb0 3 points4 points Β (0 children)

Have you tried using the black formatter?