def get_inputs_and_params(func):
 sig = signature(func)
 inputs = []
 params = []
 for param in sig.parameters.values():
  if (param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD)):
   raise ValueError(u'Signature must not have *args or **kwargs')
  if (param.default == param.empty):
   inputs.append(param)
  else:
   params.append(param)
 return (inputs, params)

def get_inputs_and_params ( func ) : sig = signature ( func ) inputs = [ ] params = [ ] for param in sig . parameters . values ( ) : if ( param . kind in ( param . VAR_POSITIONAL , param . VAR_KEYWORD ) ) : raise ValueError ( u'Signature must not have *args or **kwargs' ) if ( param . default == param . empty ) : inputs . append ( param ) else : params . append ( param ) return ( inputs , params )
given a callable .