wrf.arg_location

wrf.arg_location(func, argname, args, kwargs)

Return the function arguments as a single list along with the index within that list for a specified argument name.

This function parses the args, kargs and signature looking for the location of argname, and returns a list containing all arguments, along with the argument location in that list.

Parameters:
  • func (function) – The function to examine (usually the function that is wrapped).
  • argname (str) – The argument name to locate.
  • args (tuple) – The positional arguments.
  • kwargs (dict) – The keyword arguments.
Returns:

A tuple containing the list of all argument values along with the index for location of argname.

Return type:

tuple