#NEWLINE# def add_listener( self , evt , callback ) : #NEWLINE# #INDENT# listeners = self . _listeners . get ( evt , None ) #NEWLINE# if ( not listeners ) : #NEWLINE# #INDENT# listeners = set ( ) #NEWLINE# self . _listeners [ evt ] = listeners #NEWLINE# #UNINDENT# listeners . update ( [ self ] )