INNER CODE UNIT · Python

Subscriber

netaddr/netaddr · netaddr/core.py:56

class Subscriber(object):
    """
    An abstract class defining the interface expected by a Publisher.
    """

    def update(self, data):
        """
        A callback method used by a Publisher to notify this Subscriber about
        updates.

        :param data: a Python object containing data provided by Publisher.
        """
        raise NotImplementedError('cannot invoke virtual method!')


class PrettyPrinter(Subscriber):
    """
    A concrete Subscriber that employs the pprint in the standard library to

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…