5 Dec
2006
5 Dec
'06
10:27 a.m.
if (my_expresion): toreturn = a else: toreturn = b
return toretun Try: tal:define="toreturn python: my_expression and a or b"
but you need to be aware that 'a' has to be logical True in context of this statement (if a may be 0 or '' then this may fail). or tal:define="toreturn python: test(my_expression,a, b)" -- Maciej Wisniowski