Next: List displays Up: Atoms Previous: Literals

Parenthesized forms

A parenthesized form is an optional condition list enclosed in parentheses:


parenth_form:      "(" [condition_list] ")"

A parenthesized condition list yields whatever that condition list yields.

An empty pair of parentheses yields an empty tuple object. Since tuples are immutable, the rules for literals apply here.

(Note that tuples are not formed by the parentheses, but rather by use of the comma operator. The exception is the empty tuple, for which parentheses are required - allowing unparenthesized ``nothing'' in expressions would causes ambiguities and allow common typos to pass uncaught.)


guido@cwi.nl