def register(self, event_name):
        """
        Decorator,

        Registers the decorated function as a callback for the `event_name`
        given.

        :param event_name: The name of the event to register for.

        Example:
            >>> callbacks = Callbacks()
            >>> @callbacks.register("my_event")
            ... def hello():
            ...     print("Hello world")
            ...
            >>> # Which then can be called
            >>> callbacks.call("my_event")
            Hello world

        """
        def registrar(func):
            self.callbacks[event_name].append(func)

            return func

        return registrar
Decorator,

        Registers the decorated function as a callback for the `event_name`
        given.

        :param event_name: The name of the event to register for.

        Example:
            >>> callbacks = Callbacks()
            >>> @callbacks.register("my_event")
            ... def hello():
            ...     print("Hello world")
            ...
            >>> # Which then can be called
            >>> callbacks.call("my_event")
            Hello world