def __yield_handlers(self, event_type):
if event_type not in self.event_types:<EOL><INDENT>raise ValueError("<STR_LIT>" % (event_type, self, self.event_types))<EOL><DEDENT>for frame in list(self._event_stack):<EOL><INDENT>if event_type in frame:<EOL><INDENT>yield frame[event_type]<EOL><DEDENT><DEDENT>if hasattr(self, event_type):<EOL><INDENT>yield getattr(self, event_type)<EOL><DEDENT>
Yield all the handlers registered for the given event type.