get_keyword_defaults

sherpa.utils.get_keyword_defaults(func: Callable, skip: int = 0) dict[str, Any][source] [edit on github]

Return the keyword arguments and their default values.

Note that a similar function sherpa.plot.backend_utils.get_keyword_defaults exits, which differs from this one in that it deals with keyword-only arguments, not all arguments.

Parameters:
func

The function to query.

skipint, optional

The number of keyword arguments to skip.

Returns:
valsdict

The keys are names of the keyword arguments, the values are the default value for that parameter. It can be empty.