(self, sig)
Internal helper to validate a signal.

        Raise ValueError if the signal number is invalid or uncatchable.
        Raise RuntimeError if there is a problem setting up the handler.
Internal helper to validate a signal.
Internal helper to validate a signal .
def _check_signal(self, sig):
        """Internal helper to validate a signal.

        Raise ValueError if the signal number is invalid or uncatchable.
        Raise RuntimeError if there is a problem setting up the handler.
        """
        if not isinstance(sig, int):
            raise TypeError(f'sig must be an int, not {sig!r}')

        if sig not in signal.valid_signals():
            raise ValueError(f'invalid signal number {sig}')
def _check_signal ( self , sig ) : if not isinstance ( sig , int ) : raise TypeError ( f'sig must be an int, not {sig!r}' ) if sig not in signal . valid_signals ( ) : raise ValueError ( f'invalid signal number {sig}' )