I like Python's whitespace formatting and legibility. But can you, or is there a common/standard way of delimiting blocks of code that are not to be indented, ie do not belong in nested loops?
I have two parts of a procedure that belong inside a main header. Something like step 2 has parts 2.1 and parts 2.2.
Commenting so far I have something like:
# Section 2
<code>
# Section 2.1
<code>
# Section 2.2
<code>
But I would prefer something like:
# Section 2
<code>
# Section 2.1
<code>
# Section 2.2
<code>
But neither 2.1
nor 2.2
are sub-loops and I know this is illegal. They just run in sequence but are logical steps (to me) that fall under the 2
header so when I look at my code I know what part of the program they are.
How do you handle these cases when coding?