#NEWLINE# @ _translate_excp #NEWLINE# def add_state( self , state , on_enter = None , on_exit = None , target = None , terminal = None , stable = False ) : #NEWLINE# #INDENT# "Adds a given state to the state machine.\n\n        :param stable: Use this to specify that this state is a stable/passive\n                       state. A state must have been previously defined as\n                       'stable' before it can be used as a 'target'\n        :param target: The target state for 'state' to go to.  Before a state\n                       can be used as a target it must have been previously\n                       added and specified as 'stable'\n\n        Further arguments are interpreted as for parent method ``add_state``.\n        " #NEWLINE# self . _validate_target_state ( target ) #NEWLINE# super ( FSM , self ) . add_state ( state , terminal = stable , on_enter = on_enter , on_exit = on_exit ) #NEWLINE# self . _states [ state ] . update ( { #NEWLINE# #INDENT# 'stable' : stable , #NEWLINE# 'target' : target , #NEWLINE# #UNINDENT# } )