Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.5 KB

File metadata and controls

44 lines (31 loc) · 1.5 KB
Root.Redundancy.UnreachableCode Parent Index
Sibling aspects Clone UnusedImport UnusedVariable

UnreachableCode

Unreachable code, sometimes called dead code, is source code that can never be executed during the program execution.

Subaspects

Example

def func():
    return True

if func():
    a = {}
else:
    a = (i for i in range (5))
    print (id(a))

Importance

Unreachable code, makes the source code longer and more difficult to maintain.

How to fix this

Those pieces of code can easily be removed without consequences.