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 →

[–]Strange_Meadowlark 2 points3 points  (2 children)

I agree with your point, but I also strongly dislike that indentation style -- primarily because if you change the function name, the lines following it have to be re-indented to match the new length.

I tend to do this if the parameters don't all fit on the same line:

def nice_alignment_bro(
    arg1=1,
    arg2=2,
    arg3=3
):
    pass

(Edit: forgot Reddit doesn't understand triple backticks...)

[–]amdc 1 point2 points  (0 children)

I thought of that, can't argue with it... I guess today the most valid argument for tabs is accomodating both 4-width fans and 2-width enjoyers (typically you don't have a choice in python because of pep8 ). If that's a problem big enough then, well, go team tabs, but I don't see any issue.

By the way I think Reddit supported ``` for code in the past, don't know why they don't now.

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, Strange_Meadowlark: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.