PEP 308: ternary operator

Anders J. Munch andersjm at dancontrol.dk
Thu Feb 20 09:26:16 EST 2003


"Terry Hancock" <hancock at anansispaceworks.com> wrote:
> 1) Is it <cond>? <a>:<b> or <cond>: <a>?<b>
> I can never remember this!

<a> and <b> are answers, <cond> is the question.
The question is followed by a question mark. 

Quite logical, actually.

- Anders






More information about the Python-list mailing list