parameters: (self, node)
return_statement: return result
docstring: Eliminate dead code.
docstring_summary: Eliminate dead code.
docstring_tokens: Eliminate dead code .
function: def visit_If(self, node):
          """Eliminate dead code."""
          # do not optimize ifs that have a block inside so that it doesn't
          # break super().
          if node.find(nodes.Block) is not None:
              return self.generic_visit(node)
          try:
              val = self.visit(node.test).as_const()
          except nodes.Impossible:
              return self.generic_visit(node)
          if val:
              body = node.body
          else:
              body = node.else_
          result = []
          for node in body:
              result.extend(self.visit_list(node))
          return result
function_tokens: def visit_If ( self , node ) : # do not optimize ifs that have a block inside so that it doesn't # break super(). if node . find ( nodes . Block ) is not None : return self . generic_visit ( node ) try : val = self . visit ( node . test ) . as_const ( ) except nodes . Impossible : return self . generic_visit ( node ) if val : body = node . body else : body = node . else_ result = [ ] for node in body : result . extend ( self . visit_list ( node ) ) return result