callbackmethod¶
Defined in module: wield.declarative.callbacks.callbacks.callbackmethod
- class callbackmethod(fget, doc=None)[source][github]¶
Bases:
objectWraps a function into a callback
- Parameters:
fget – function to wrap as the default with docstring
doc – (optional) provide this as the docstring rather than using fget’s
This wraps the method so that whenever it is called, other registered callbacks are called (after the instancemethod).
This type is a descriptor(non-data). It is intended to be used via the decorator syntax.
Internally this works by constructing a callback object and memoizing it to preserve any callbacks added to it.
Methods
__init__(fget[, doc])