rberga06.utils.func.dec.DecoratorWithAttr#

class rberga06.utils.func.dec.DecoratorWithAttr(data: _X, /)#

Bases: Decorator, Protocol[_X]

Define a decorator that manages an attribute on a function.

__init__(data: _X, /) None#

Methods

__init__(data, /)

decorate(f, /)

Decorate function f.

get(f, /)

spec(__decorated__, *args, **kwargs)

Decorator behaviour specification.

Attributes

ATTR

data

decorate(f: _F, /) _F#

Decorate function f.

spec(__decorated__: Callable[[...], Any], *args: Any, **kwargs: Any) Any#

Decorator behaviour specification.