Next Chapter | Up | Next Section | Contents

Expression syntax


The expression syntax is that of the Python4 programming language and is similar to the syntax of other common programming languages like C or Java. Table 1 provides examples of simple expressions by giving the syntax and capabilities of each expression.

Expression examples

 

Expression

Explanation

x*2+3

Numeric expression

func(a,b)

Function call

obj.title

Get attribute title from obj

obj.meth(a,b)

Invoke method5 meth of obj with arguments a and b

(age < 12 or age > 65) and status == 'student'

A boolean (true/false) test.

REQUEST['HTTP_REFERER']

Look up a value from REQUEST using the key ' HTTP_REFERER '

Next Chapter | Up | Next Section | Contents