def add_observer(self, signal, observer):
        """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.

        """

        self._is_allowed_signal(signal)
        self._add_observer(signal, observer)
def add_observer ( self , signal , observer ) : self . _is_allowed_signal ( signal ) self . _add_observer ( signal , observer )
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.