'Pythonic signals and slots.'

def notify_observers(self, message, *args, **opts):

    if (not self.notification_enabled):
        return
    observers = set(self.observers.get(message, set()))
    for method in observers:
        method(*args, **opts)
