TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alex-ber/AlexBerUtils/llms.txt
Use this file to discover all available pages before exploring further.
inspects module extends Python’s inspect module with utilities for method detection, argument mapping, and runtime modification of function default values.
issetdescriptor
ReturnsTrue if the object is a method descriptor that exposes a setter (has a __set__ attribute), but is not a class, method, or function.
The object to inspect.
bool
ismethod
Checks whether the given object is a bound method. Differs frominspect.ismethod in that it also returns True for functions that carry a __self__ attribute (e.g. methods accessed through certain descriptors).
The object to check.
bool — True if the object is a bound method.
has_method
Checks whether a class (or any class in its MRO) defines a callable attribute with the given name.The class to inspect.
Name of the method to look for.
bool — True if cls (or one of its base classes) has a routine with the given name.
resolve_function_args
Resolves the complete set of arguments for a function call, merging explicit positional/keyword arguments with the function’s default values.The function whose argument mapping is to be resolved.
Positional arguments as they would be passed to
func.Keyword arguments as they would be passed to
func.Dict[str, Any] — mapping of parameter names to their resolved values (explicit arguments take precedence over defaults).
update_function_defaults
Decorator that modifies or removes default parameter values of a function at call time.The function or method to decorate.
Mapping of parameter names to their new default values. Defaults to
{}.List of parameter names whose default values should be removed, making them required. Defaults to
[].If
False (default), only parameters that already have a default value are updated. If True, all parameters listed in new_defaults or remove_defaults are updated regardless of whether they originally had defaults.__name__, __doc__, and other attributes are preserved via functools.wraps.