Quantcast
Channel: Where to start line breaking in Python? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Where to start line breaking in Python?

$
0
0

PEP 8 does not seem to prescribe whether line breaking should start from the beginning or from the end of the line, in order to stay within the 79 character limit.

For instance where should I break this line?

long_function_name_1(long_function_name_2(long_function_name_3(long_function_name_4(long_function_name_5(long_function_name_6(long_function_name_7(long_function_name_8(args))))))))

From the beginning?

long_function_name_1(
    long_function_name_2(
        long_function_name_3(
            long_function_name_4(
                long_function_name_5(
                    long_function_name_6(
                        long_function_name_7(long_function_name_8(args))))))))

Or from the end?

long_function_name_1(long_function_name_2(long_function_name_3(
    long_function_name_4(long_function_name_5(long_function_name_6(
        long_function_name_7(long_function_name_8(args))))))))

I am particularly interested in the rationale behind the recommendation of one form over the other.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images