Root.Redundancy.UnreachableCode |
Parent | Index |
Sibling aspects | Clone | UnusedImport | UnusedVariable |
Unreachable code, sometimes called dead code, is source code that can never be executed during the program execution.
def func():
return True
if func():
a = {}
else:
a = (i for i in range (5))
print (id(a))
Unreachable code, makes the source code longer and more difficult to maintain.
Those pieces of code can easily be removed without consequences.