(self, state)
return self.states[state]
Return the State instance with the passed name.
Return the State instance with the passed name.
Return the State instance with the passed name .
def get_state(self, state):
        """ Return the State instance with the passed name. """
        if isinstance(state, Enum):
            state = state.name
        if state not in self.states:
            raise ValueError("State '%s' is not a registered state." % state)
        return self.states[state]
def get_state ( self , state ) : if isinstance ( state , Enum ) : state = state . name if state not in self . states : raise ValueError ( "State '%s' is not a registered state." % state ) return self . states [ state ]