def remove_event_handler(name, func):
 for e in list(_events.get(name, [])):
  if (e.func is func):
   _events[name].remove(e)

def remove_event_handler ( name , func ) : for e in list ( _events . get ( name , [ ] ) ) : if ( e . func is func ) : _events [ name ] . remove ( e )
remove func from the handlers for event name .