PEP 308: Precendence of "a then b else c"

Anders J. Munch andersjm at dancontrol.dk
Thu Feb 13 06:24:09 EST 2003


"Raymond Hettinger" <vze4rx4y at verizon.net> wrote:
> The leading options on the table are:
> 
> *     <cond> then <expr1> else <expr2>

What's the precedence of this thing?

For example, what do each of these mean:
   a + b then c else d
   a then b else c + d
   a and b then c else d
   a then b else c and d
   a, b then c else d
   a then b else c, d
   lambda: a then b else c

- Anders






More information about the Python-list mailing list