Hot take: python is too verbose to have an 80-character line length standard while retaining the semantic readibility it promotes as a feature.
-
Show this thread
-
All too often I look at code and just think "where am I even suppose to break this line???"
1 reply 0 retweets 14 likesShow this thread -
This line is 95 characters. I can break at the comma and it comes down to 75. But 75 characters to do some really basic stuff. Maybe I can simplify the code, idk. Not the point. initial_chars = sorted(set([n[0].upper() for n in df['street'].dropna()]), key=locale.strxfrm)
10 replies 1 retweet 9 likesShow this thread -
Replying to @EmilyGorcenski
I’d break that in 4 (!!!) lines (new line after “sorted(“, new line after the first comma, new line before the last parenthesis), but you’re damn right that the 80 cols is just ridiculous, especially on the modern, large screens we have nowadays.
1 reply 0 retweets 1 like -
Replying to @soldni
According to PEP-8 and the python specs, two of those line breaks wouldn't lead to a reduction in line length, just readability.
2 replies 0 retweets 0 likes -
Replying to @EmilyGorcenski
oh right because PEP8 wants you to indent to match parenthesis level
1 reply 0 retweets 1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.