(self, args)
return result
Extension statement: call a python function as a statement.
Extension statement: call a python function as a statement.
Extension statement : call a python function as a statement .
def call_as_statement(self, args):
        """Extension statement: call a python function as a statement."""
        self._load_extensions()
        func_name = next(args)
        func_args = list(arg.to_value() for arg in args if arg is not None)
        try:
            result = self._ext_funcs[func_name](*func_args)
        except (error.Exit, error.Reset):
            raise
        except Exception as e:
            logging.error(u'Could not call extension function `%s%s`: %s', func_name, tuple(func_args), repr(e))
            raise error.BASICError(error.INTERNAL_ERROR)
        return result
def call_as_statement ( self , args ) : self . _load_extensions ( ) func_name = next ( args ) func_args = list ( arg . to_value ( ) for arg in args if arg is not None ) try : result = self . _ext_funcs [ func_name ] ( * func_args ) except ( error . Exit , error . Reset ) : raise except Exception as e : logging . error ( u'Could not call extension function `%s%s`: %s' , func_name , tuple ( func_args ) , repr ( e ) ) raise error . BASICError ( error . INTERNAL_ERROR ) return result