PEP 308: ternary operator
Terry Reedy
tjreedy at udel.edu
Sat Feb 22 20:42:07 EST 2003
"Dan Bishop" <danb_83 at yahoo.com> wrote in message
news:ad052e5c.0302221635.1d0ea49d at posting.google.com...
> Also, have you ever noticed that all selection functions in other
> languages (or spreadsheets, or CAS's) use the same order?
>
> Derive: IF(<cond>, <a>, <b>)
> Excel: IF(<cond>, <a>, <b>)
> Lisp: (cond (<cond> <a>) (t <b>))
> TI-89 BASIC: when(<cond>, <a>, <b>)
> VB: iif(<cond>, <a>, <b>)
(No, years of Python have dimmed memory of such details for other
languages.)
>The a-cond-b order is familiar to no one.
Good point. I don't think Python should gratuitously introduce a new
order.
Terry J. Reedy
More information about the Python-list
mailing list