diff --git a/pep-0308.txt b/pep-0308.txt index 5239cf751..af72bcfe4 100644 --- a/pep-0308.txt +++ b/pep-0308.txt @@ -98,6 +98,15 @@ Alternatives advantage of evaluating strictly from left to right (not that that is a requirement for being Pythonic -- list comprehensions don't). + Many people suggest adding a new builtin instead of extending the + syntax of the language, e.g.: + + ifelse(condition, expression1, expression2) + + This won't work the way a syntax extension will because both + expression1 and expression2 must be evaluated before the function + is called. There's no way to short-circuit the expression + evaluation. Copyright