(self, name, handler)
Attach a single event handler.

        :Parameters:
            `name` : str
                Name of the event type to attach to.
            `handler` : callable
                Event handler to attach.
Attach a single event handler.
Attach a single event handler .
def set_handler(self, name, handler):
        '''Attach a single event handler.

        :Parameters:
            `name` : str
                Name of the event type to attach to.
            `handler` : callable
                Event handler to attach.

        '''
        # Create event stack if necessary
        if type(self._event_stack) is tuple:
            self._event_stack = [{}]

        self._event_stack[0][name] = handler
def set_handler ( self , name , handler ) : # Create event stack if necessary if type ( self . _event_stack ) is tuple : self . _event_stack = [ { } ] self . _event_stack [ 0 ] [ name ] = handler