publish-subscribe pattern yelling is form of publishing --margaret atwood if you think back to the observer pattern we looked at in you will remember that we had an observable class and some observer classes whenever the observable object changed its state and was polled for changeit alerted all the observers registered with it that they needed to activate callback there is no need to jump back to that as the code we are talking about is in this snippetclass concreteobserver(object)def update(selfobserved)print("observing{}format(observed)class observable(object)def __init__(self)self callbacks set(self changed false def register(selfcallback)self callbacks add(callback(cwessel badenhorst badenhorstpractical python design patterns