parameters: (self, *args, **kwargs)
docstring: Save the original SIGINT handler for later.
docstring_summary: Save the original SIGINT handler for later.
docstring_tokens: Save the original SIGINT handler for later .
function: def __init__(self, *args, **kwargs):
          # type: (List[Any], Dict[Any, Any]) -> None
          """
          Save the original SIGINT handler for later.
          """
          # https://github.com/python/mypy/issues/5887
          super().__init__(*args, **kwargs)  # type: ignore
  
          self.original_handler = signal(SIGINT, self.handle_sigint)
  
          # If signal() returns None, the previous handler was not installed from
          # Python, and we cannot restore it. This probably should not happen,
          # but if it does, we must restore something sensible instead, at least.
          # The least bad option should be Python's default SIGINT handler, which
          # just raises KeyboardInterrupt.
          if self.original_handler is None:
              self.original_handler = default_int_handler
function_tokens: def __init__ ( self , * args , * * kwargs ) : # type: (List[Any], Dict[Any, Any]) -> None # https://github.com/python/mypy/issues/5887 super ( ) . __init__ ( * args , * * kwargs ) # type: ignore self . original_handler = signal ( SIGINT , self . handle_sigint ) # If signal() returns None, the previous handler was not installed from # Python, and we cannot restore it. This probably should not happen, # but if it does, we must restore something sensible instead, at least. # The least bad option should be Python's default SIGINT handler, which # just raises KeyboardInterrupt. if self . original_handler is None : self . original_handler = default_int_handler