def listener(self, event):
def decorator(listener):<EOL><INDENT>self.listeners[event].append(listener)<EOL>return listener<EOL><DEDENT>return decorator<EOL>
Create a listener from a decorated function.

        :param event: Event to listen to.