'Add a subscriber for an event.
:param event: The name of an event.
:param subscriber: The subscriber to be added (and called when the
event is published).
:param append: Whether to append or prepend the subscriber to an
existing subscriber list for the event.'

def add(self, event, subscriber, append=True):

    subs = self._subscribers
    if (event not in subs):
        subs[event] = deque([subscriber])
    else:
        sq = subs[event]
        if append:
            sq.append(subscriber)
        else:
            sq.appendleft(subscriber)
