def action(self, verb, args):
        """Process the described action

        Parameters
        ----------
        verb : str, {'add', 'remove', 'get'}
            The specific action to perform
        args : {list, set, tuple}
            Any relevant arguments for the action.

        Raises
        ------
        TypeError
            If args is an unrecognized type
        ValueError
            If the action specified is unrecognized

        Returns
        -------
        list
            Elements dependent on the action
        """
        if not isinstance(args, (list, set, tuple)):
            raise TypeError("args is unknown type: %s" % type(args))

        if verb == 'add':
            response = ({'add': i} for i in self._action_add(args))
        elif verb == 'remove':
            response = ({'remove': i} for i in self._action_remove(args))
        elif verb == 'get':
            response = ({'get': i} for i in self._action_get(args))
        else:
            raise ValueError("Unknown action: %s" % verb)

        self.forwarder(response)
def action ( self , verb , args ) : if not isinstance ( args , ( list , set , tuple ) ) : raise TypeError ( "args is unknown type: %s" % type ( args ) ) if verb == 'add' : response = ( { 'add' : i } for i in self . _action_add ( args ) ) elif verb == 'remove' : response = ( { 'remove' : i } for i in self . _action_remove ( args ) ) elif verb == 'get' : response = ( { 'get' : i } for i in self . _action_get ( args ) ) else : raise ValueError ( "Unknown action: %s" % verb ) self . forwarder ( response )
Process the described action

        Parameters
        ----------
        verb : str, {'add', 'remove', 'get'}
            The specific action to perform
        args : {list, set, tuple}
            Any relevant arguments for the action.

        Raises
        ------
        TypeError
            If args is an unrecognized type
        ValueError
            If the action specified is unrecognized

        Returns
        -------
        list
            Elements dependent on the action