'Get signal number by name.'

def signum(self, name):

    if isinstance(name, numbers.Integral):
        return name
    if ((not isinstance(name, string_t)) or (not name.isupper())):
        raise TypeError(u'signal    name    must    be    uppercase    string.')
    if (not name.startswith(u'SIG')):
        name = (u'SIG' + name)
    return getattr(_signal, name)
