Attach a handler (any Python callable) for the event.

def on(self, handler):
        """Attach a handler (any Python callable) for the event."""
        if not hasattr(handler, '__call__'):
            raise TypeError('handler is not a callable object.')
        self.handlers.add(handler)