'Properly register a hook.'

def register_hook(self, event, hook):

    if isinstance(hook, collections.Callable):
        self.hooks[event].append(hook)
    elif hasattr(hook, '__iter__'):
        self.hooks[event].extend((h for h in hook if isinstance(h, collections.Callable)))
