pyx12.decorators

Classes

memoized

Decorator. Caches a function's return value each time it is called.

Functions

dump_args(func)

This decorator dumps out the arguments passed to a function before calling it

memoize(obj)

Module Contents

pyx12.decorators.dump_args(func)[source]

This decorator dumps out the arguments passed to a function before calling it

Parameters:

func (collections.abc.Callable[Ellipsis, Any])

Return type:

collections.abc.Callable[Ellipsis, Any]

pyx12.decorators.memoize(obj)[source]
Parameters:

obj (collections.abc.Callable[Ellipsis, Any])

Return type:

collections.abc.Callable[Ellipsis, Any]

class pyx12.decorators.memoized(func)[source]

Decorator. Caches a function’s return value each time it is called. If called later with the same arguments, the cached value is returned (not reevaluated).

Parameters:

func (collections.abc.Callable[Ellipsis, Any])

func: collections.abc.Callable[Ellipsis, Any][source]
cache: dict[Any, Any][source]