Consider Commenting the Condition Being Checked [DS16] [WHAT]

Consider Commenting the Condition Being Checked [DS16] [WHAT]

Tip DS16

Sometimes, it may not be possible to come up with a sensible/concise summary for an entire if statement block (including its body or chained-on else if/elif or else blocks). The exact conditions in a chain or resulting logic may be too intricate to summarize succinctly. In such cases, having a MAJOR comment just summarizing the condition can be more appropriate, still giving a high-level, easily-scannable marker in the code.

The following example demonstrates this style:

Busy coding or busy meeting ad.png