For review: PEP 308 - If-then-else expression
skip at pobox.com
Fri Feb 7 21:32:14 CET 2003
Geoff> What about ifelse(condition, then clause[, else clause])?
In every discussion of a ternary operator this sort of suggestion comes up.
The problem with a new builtin is that all arguments must be evaluated
before the function is called. This prevents the short-circuit behavior
that is so useful in many instances.
I've updated PEP 308 to reflect this.
More information about the Python-list