Python Sparse data Analysis Package
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.
- class pysap.base.observable.Observable(signals)[source]¶
Base class for observable classes.
This class defines a simple interface to add or remove observers on an object.
- add_observer(signal, observer)[source]¶
Add an observer to the object. Raise an exception if the signal is not allowed.
- Parameters
signal : str
a valid signal.
observer : @func
a function that will be called when the signal is emitted.
- property allowed_signals¶
Events allowed for the current object.
Follow us