puretabix/fsm.py
def add_transition(
        self, start_state, end_state, transition_class, condition, callback
    ):
        """

        callback should be a function that accepts the current character of the state
        machine as the last positional arguments i.e. it is called like:
        callback(*args, current_char, **kwargs)

        because callback uses the last positional argument as the character, the first
        positional argment can be used by a class instance as self
        """
        if start_state not in self.transitions:
            self.transitions[start_state] = []
        self.transitions[start_state].append(
            transition_class(end_state, condition, callback)
        )


        callback should be a function that accepts the current character of the state
        machine as the last positional arguments i.e. it is called like:
        callback(*args, current_char, **kwargs)

        because callback uses the last positional argument as the character, the first
        positional argment can be used by a class instance as self
        
callback should be a function that accepts the current character of the state
machine as the last positional arguments i.e. it is called like:
callback(*args, current_char, **kwargs)

because callback uses the last positional argument as the character, the first
positional argment can be used by a class instance as self
callback should be a function that accepts the current character of the state machine as the last positional arguments i . e . it is called like : callback ( * args current_char ** kwargs ) because callback uses the last positional argument as the character the first positional argment can be used by a class instance as self
def add_transition(
        self, start_state, end_state, transition_class, condition, callback
    ):
        if start_state not in self.transitions:
            self.transitions[start_state] = []
        self.transitions[start_state].append(
            transition_class(end_state, condition, callback)
        )
def add_transition ( self , start_state , end_state , transition_class , condition , callback ) : if start_state not in self . transitions : self . transitions [ start_state ] = [ ] self . transitions [ start_state ] . append ( transition_class ( end_state , condition , callback ) )
callback should be a function that accepts the current character of the state
machine as the last positional arguments i.e.
callback should be a function that accepts the current character of the state machine as the last positional arguments i . e .
"""

        callback should be a function that accepts the current character of the state
        machine as the last positional arguments i.e. it is called like:
        callback(*args, current_char, **kwargs)

        because callback uses the last positional argument as the character, the first
        positional argment can be used by a class instance as self
        """
self
start_state
end_state
transition_class
condition
callback