diff --git a/episodes/15-coding-conventions.md b/episodes/15-coding-conventions.md index a45506b6..9b7426b8 100644 --- a/episodes/15-coding-conventions.md +++ b/episodes/15-coding-conventions.md @@ -138,33 +138,33 @@ or a hanging indent. ```python # Add an extra level of indentation (extra 4 spaces) to distinguish arguments from the rest of the code that follows def long_function_name( - var_one, var_two, var_three, - var_four): - print(var_one) + var_one, var_two, var_three, + var_four): + print(var_one) # Aligned with opening delimiter foo = long_function_name(var_one, var_two, - var_three, var_four) + var_three, var_four) # Use hanging indents to add an indentation level like paragraphs of text where all the lines in a paragraph are # indented except the first one foo = long_function_name( - var_one, var_two, - var_three, var_four) + var_one, var_two, + var_three, var_four) # Using hanging indent again, but closing bracket aligned with the first non-blank character of the previous line a_long_list = [ - [[1, 2, 3], [4, 5, 6], [7, 8, 9]], [[0.33, 0.66, 1], [0.66, 0.83, 1], [0.77, 0.88, 1]] - ] + [[1, 2, 3], [4, 5, 6], [7, 8, 9]], [[0.33, 0.66, 1], [0.66, 0.83, 1], [0.77, 0.88, 1]] + ] # Using hanging indent again, but closing bracket aligned with the start of the multiline contruct a_long_list2 = [ - 1, - 2, - 3, - # ... - 79 + 1, + 2, + 3, + # ... + 79 ] ``` @@ -189,11 +189,11 @@ to indicate line continuation (slightly less preferred method). ```python # Using delimiters ( ) to wrap a multi-line expression if (a == True and - b == False): + b == False): # Using a backslash (\) for line continuation if a == True and \ - b == False: + b == False: ``` ### Should a Line Break Before or After a Binary Operator?