INNER CODE UNIT · Python
Publisher
netaddr/netaddr · netaddr/core.py:106
class Publisher(object):
"""
A 'push' Publisher that maintains a list of Subscriber objects notifying
them of state changes by passing them update data when it encounter events
of interest.
"""
def __init__(self):
"""Constructor"""
self.subscribers = []
def attach(self, subscriber):
"""
Add a new subscriber.
:param subscriber: a new object that implements the Subscriber object
interface.
"""