Hacker News new | ask | show | jobs
by Longwelwind 3438 days ago
I believe it will be:

    def very_long_function_name(
        arg_one,
        arg_two,
        arg_three,
        arg_four
    ):
It's consistent and doesn't require spaces so it lets you use tabs to let the reader choose its indentation size.
1 comments

I can't tell (might have got lost in the edit), but PEP8 suggests the arguments are more indented than the function body:

    def very_long_function_name(
            arg_one,
            arg_two,
            arg_three,
            arg_four
        ):
        pass
For data structures, I definitely prefer the bracket to be on it's own line, but for function definitions I don't, so I'm also a fan of:

    def very_long_function_name(
            arg_one,
            arg_two,
            arg_three,
            arg_four):
        pass

    def very_long_function_name(
            arg_one, arg_two, arg_three, arg_four):
        pass
> For data structures, I definitely prefer the bracket to be on it's own line, but for function definitions I don't, so I'm also a fan of:

    def very_long_function_name(
            arg_one, arg_two, arg_three, arg_four):
        pass
Please don't. It looks awful.