def is_arity(n, func, sigspec=None):
 (sigspec, rv) = _check_sigspec(sigspec, func, _sigs._is_arity, n, func)
 if (sigspec is None):
  return rv
 num = num_required_args(func, sigspec)
 if (num is not None):
  num = (num == n)
  if (not num):
   return False
 varargs = has_varargs(func, sigspec)
 if varargs:
  return False
 keywords = has_keywords(func, sigspec)
 if keywords:
  return False
 if ((num is None) or (varargs is None) or (keywords is None)):
  return None
 return True

def is_arity ( n , func , sigspec = None ) : ( sigspec , rv ) = _check_sigspec ( sigspec , func , _sigs . _is_arity , n , func ) if ( sigspec is None ) : return rv num = num_required_args ( func , sigspec ) if ( num is not None ) : num = ( num == n ) if ( not num ) : return False varargs = has_varargs ( func , sigspec ) if varargs : return False keywords = has_keywords ( func , sigspec ) if keywords : return False if ( ( num is None ) or ( varargs is None ) or ( keywords is None ) ) : return None return True
does a function have only n positional arguments? this function relies on introspection and does not call the function .