Template.Expr

Fields

None

Methods

class

from_string (str)

class

new_boolean (value)

class

new_flow (type, condition, primary, secondary)

class

new_fn_call (builtin, param)

class

new_func (name, symlist, list)

class

new_nop ()

class

new_null ()

class

new_number (value)

class

new_require (typelib, version)

class

new_simple (type, left, right)

class

new_stmt_list (stmts)

class

new_string (value, length)

class

new_symbol_assign (symbol, right)

class

new_symbol_ref (symbol)

class

new_user_fn_call (name, param)

eval (scope, return_value)

new_anon_call (params)

new_getattr (attr)

new_gi_call (name, params)

new_invert_boolean ()

new_setattr (attr, right)

ref ()

unref ()

Details

class Template.Expr
classmethod from_string(str)
Parameters:

str (str) –

Raises:

GLib.Error

Return type:

Template.Expr

classmethod new_boolean(value)
Parameters:

value (bool) –

Return type:

Template.Expr

classmethod new_flow(type, condition, primary, secondary)
Parameters:
Return type:

Template.Expr

classmethod new_fn_call(builtin, param)
Parameters:
Return type:

Template.Expr

classmethod new_func(name, symlist, list)
Parameters:
Return type:

Template.Expr

classmethod new_nop()
Return type:

Template.Expr

classmethod new_null()
Return type:

Template.Expr

classmethod new_number(value)
Parameters:

value (float) –

Return type:

Template.Expr

classmethod new_require(typelib, version)
Parameters:
  • typelib (str) –

  • version (str) –

Return type:

Template.Expr

classmethod new_simple(type, left, right)
Parameters:
Return type:

Template.Expr

classmethod new_stmt_list(stmts)
Parameters:

stmts ([Template.Expr]) – a GLib.PtrArray of Template.Expr which will be evaluated in sequence.

Returns:

a new Template.Expr

Return type:

Template.Expr

Creates a new statement list for which the last item will be used as the “return value” from execution.

New in version 3.36.

classmethod new_string(value, length)
Parameters:
  • value (str) –

  • length (int) –

Return type:

Template.Expr

classmethod new_symbol_assign(symbol, right)
Parameters:
Return type:

Template.Expr

classmethod new_symbol_ref(symbol)
Parameters:

symbol (str) –

Return type:

Template.Expr

classmethod new_user_fn_call(name, param)
Parameters:
Return type:

Template.Expr

eval(scope, return_value)
Parameters:
Raises:

GLib.Error

Return type:

bool

new_anon_call(params)
Parameters:

params (Template.Expr) –

Return type:

Template.Expr

new_getattr(attr)
Parameters:

attr (str) –

Return type:

Template.Expr

new_gi_call(name, params)
Parameters:
Return type:

Template.Expr

new_invert_boolean()
Return type:

Template.Expr

new_setattr(attr, right)
Parameters:
Return type:

Template.Expr

ref()
Return type:

Template.Expr

unref()