taurus.core.util.wrap

Functions

is_wrapped(wrapped)[source]

Determines if the given callable is being wrapped by another callable

is_wrapping(wrapper)[source]

Determines if the given callable is a wrapper for another callable

wrapped(wrapper, recursive=True)[source]

Returns the wrapped function around the given wrapper. If the given callable is not “wrapping” any function, the wrapper itself is returned

wraps(wrapped, *args, **kwargs)[source]

A wrap decorator which stores in the returned function a reference to the wrapped function (in member ‘__wrapped__’)