class rcognita.callbacks.introduce_callbacks(default_callbacks=None)

A class decorator that introduces a callbacks attribute to the decorated class. The callbacks attribute is a list of callbacks that can be applied to methods of instances of the decorated class (for instance via @apply_callbacks).


Initializes the decorator.


default_callbacks – A list of callbacks that will be used as the default value for the callbacks attribute of instances of the decorated class. If no value is specified, the callbacks attribute will be initialized to None, which will in turn make @apply_callbacks use default callbacks instead.



Initializes the decorator.