callbackstaticmethod¶
Defined in module: wield.declarative.callbacks.callbacks.callbackstaticmethod
- class callbackstaticmethod(fget, doc=None)[source][github]¶
Bases:
objectLike
callbackmethod, but does not provide self- 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). Note that self is not automatically added to the method call (so any method wrapped by this becomes like a staticmethod).
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])