rberga06.utils.func.dec.count_calls#

class rberga06.utils.func.dec.count_calls(counter: Mut[int] | None = None, /)#

Bases: DecoratorWithAttr[Mut[int]]

A decorator that counts the calls of a function.

__init__(counter: Mut[int] | None = None, /) None#

Methods

__init__([counter])

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.