For review: PEP 308 - If-then-else expression
Skip Montanaro
skip at pobox.com
Fri Feb 7 15:32:14 EST 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.
Skip
More information about the Python-list
mailing list