method_decorator
Convert a function decorator into a method decorator
def method_decorator(
decorator: callable or iterable,
name: string = ""
) - > function
Convert a function decorator into a method decorator
Parameters
| Name | Type | Description |
|---|---|---|
| decorator | callable or iterable | A single decorator function or an iterable of decorator functions to be applied to the target method. |
| name | string = "" | The name of the method to decorate when applying this to a class; required if the decorated object is a class. |
Returns
| Type | Description |
|---|---|
function | A decorator function that can be applied to a class or a method to wrap the target logic with the provided decorator(s). |