Logo Search packages:      
Sourcecode: r-cran-nws version File versions  Download package

def nwsclient::NetWorkSpace::findTry (   self,
  varName,
  missing = None 
)
Try to return a value of a variable in the workspace.

ws.findTry(varName[, missing]) -> object

If the variable has no values, the operation will return
the value specified by "missing", which defaults to the value
"None".

Note that (unlike fetchTry) findTry does not remove the value.
The value remains in the variable.

Arguments:

varName -- Name of the variable to use.

missing -- Value to return if the variable has no values.  The
default is None.

Definition at line 764 of file nwsclient.py.

                                            :
        """Try to return a value of a variable in the workspace.

        ws.findTry(varName[, missing]) -> object

        If the variable has no values, the operation will return
        the value specified by "missing", which defaults to the value
        "None".

        Note that (unlike fetchTry) findTry does not remove the value.
        The value remains in the variable.

        Arguments:

        varName -- Name of the variable to use.

        missing -- Value to return if the variable has no values.  The
                default is None.

        """
        if type(varName) != str:
            raise TypeError, 'variable name must be a string'

        try:    return self.__retrieve(varName, 'findTry', missing)
        except: return missing


Generated by  Doxygen 1.6.0   Back to index