parameters: (self, name, code)
docstring: Define a Python object from your program.
  
  This is equivalent to having an object defined in the RiveScript code, except
  your Python code is defining it instead. `name` is the name of the object, and
  `code` is a Python function (a `def`) that accepts rs,args as its parameters.
  
  This method is only available if there is a Python handler set up (which there
  is by default, unless you've called set_handler("python", None)).
docstring_summary: Define a Python object from your program.
docstring_tokens: Define a Python object from your program .
function: def set_subroutine(self, name, code):
          """Define a Python object from your program.
  
  This is equivalent to having an object defined in the RiveScript code, except
  your Python code is defining it instead. `name` is the name of the object, and
  `code` is a Python function (a `def`) that accepts rs,args as its parameters.
  
  This method is only available if there is a Python handler set up (which there
  is by default, unless you've called set_handler("python", None))."""
  
          # Do we have a Python handler?
          if 'python' in self._handlers:
              self._handlers['python']._objects[name] = code
          else:
              self._warn("Can't set_subroutine: no Python object handler!")
function_tokens: def set_subroutine ( self , name , code ) : # Do we have a Python handler? if 'python' in self . _handlers : self . _handlers [ 'python' ] . _objects [ name ] = code else : self . _warn ( "Can't set_subroutine: no Python object handler!" )