#NEWLINE# def emit( self , event , * args , **kwargs ) : #NEWLINE# #INDENT# 'Call all callback functions registered with an event.\n\n        Any positional and keyword arguments can be passed here, and they will\n        be forwarded to the callback functions.\n\n        Return the list of callback return results.\n\n        ' #NEWLINE# res = [ ] #NEWLINE# for callback in self . _callbacks . get ( event , [ ] ) : #NEWLINE# #INDENT# res . append ( callback ( * args , ** res ) ) #NEWLINE# #UNINDENT# return res