(self, callback, existing=True)
Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
Invoke `callback` for all distributions
Invoke callback for all distributions
def subscribe(self, callback, existing=True):
        """Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        """
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        if not existing:
            return
        for dist in self:
            callback(dist)
def subscribe ( self , callback , existing = True ) : if callback in self . callbacks : return self . callbacks . append ( callback ) if not existing : return for dist in self : callback ( dist )