parameters: (self)
docstring: Insert IR-nodes to initialize the exception variables.
docstring_summary: Insert IR-nodes to initialize the exception variables.
docstring_tokens: Insert IR - nodes to initialize the exception variables .
function: def _insert_exception_variables(self):
          """Insert IR-nodes to initialize the exception variables.
          """
          tryblk = self.dfainfo.active_try_block
          # Get exception variables
          endblk = tryblk['end']
          edgepushed = self.dfainfo.outgoing_edgepushed.get(endblk)
          # Note: the last value on the stack is the exception value
          # Note: due to the current limitation, all exception variables are None
          if edgepushed:
              scope = self.current_scope
              const_none = ir.Const(value=None, loc=self.loc)
              # For each variable going to the handler block.
              for var in edgepushed:
                  if var in self.definitions:
                      raise AssertionError(
                          "exception variable CANNOT be defined by other code",
                      )
                  self.store(value=const_none, name=var)
                  self._exception_vars.add(var)
function_tokens: def _insert_exception_variables ( self ) : tryblk = self . dfainfo . active_try_block # Get exception variables endblk = tryblk [ 'end' ] edgepushed = self . dfainfo . outgoing_edgepushed . get ( endblk ) # Note: the last value on the stack is the exception value # Note: due to the current limitation, all exception variables are None if edgepushed : scope = self . current_scope const_none = ir . Const ( value = None , loc = self . loc ) # For each variable going to the handler block. for var in edgepushed : if var in self . definitions : raise AssertionError ( "exception variable CANNOT be defined by other code" , ) self . store ( value = const_none , name = var ) self . _exception_vars . add ( var )