Root.Redundancy.UnreachableCode.UnreachableStatement |
Parent | Index |
Sibling aspects | UnusedFunction |
An unreachable statement is a statement that is never executed during code execution.
This aspect does not have any sub aspects.
def func():
return True
if func():
a = {}
else:
a = (i for i in range (5))
print (id(a))
We should always keep our codebase clean, having dead code uselessly makes the code longer and ambiguous.
These statement can be remove without harming the code.