(self, args)
Extension function: call a python function as a function.
Extension function: call a python function as a function.
Extension function : call a python function as a function .
def call_as_function(self, args):
        """Extension function: call a python function as a function."""
        result = self.call_as_statement(args)
        if isinstance(result, text_type):
            return self._values.new_string().from_str(self._codepage.unicode_to_bytes(result))
        if isinstance(result, bytes):
            return self._values.from_value(result, values.STR)
        elif isinstance(result, bool):
            return self._values.from_bool(result)
        elif isinstance(result, int) or isinstance(result, float):
            return self._values.from_value(result, values.DBL)
        raise error.BASICError(error.TYPE_MISMATCH)
def call_as_function ( self , args ) : result = self . call_as_statement ( args ) if isinstance ( result , text_type ) : return self . _values . new_string ( ) . from_str ( self . _codepage . unicode_to_bytes ( result ) ) if isinstance ( result , bytes ) : return self . _values . from_value ( result , values . STR ) elif isinstance ( result , bool ) : return self . _values . from_bool ( result ) elif isinstance ( result , int ) or isinstance ( result , float ) : return self . _values . from_value ( result , values . DBL ) raise error . BASICError ( error . TYPE_MISMATCH )