A chain of If/ElseIf
statements is evaluated from top to bottom. At most, only one branch will be executed: the first statement with a condition that evaluates to
True
. Therefore, duplicating a condition leads to unreachable code inside the duplicated condition block. Usually, this is due to a
copy/paste error.
The result of such duplication can lead to unreachable code or even to unexpected behavior.