(self, data)
return self.next_state
return next state. May override in a subclass to change
        behavior or pass a handler method to ctor
return next state. May override in a subclass to change
        behavior or pass a handler method to ctor
return next state . May override in a subclass to change behavior or pass a handler method to ctor
def handle(self, data):
        """
        return next state. May override in a subclass to change
        behavior or pass a handler method to ctor
        """
        if self.handler:
            state = self.handler(data)
            if state is None:
                return self.next_state
            return state
        return self.next_state
def handle ( self , data ) : if self . handler : state = self . handler ( data ) if state is None : return self . next_state return state return self . next_state