Update to PEP308: if-then-else expression
python at rcn.com
Tue Feb 11 06:54:45 CET 2003
I updated the PEP for Guido van Rossum.
If the cron job is doing its thing, the results will be visible in
a few hours.
The update reflects updated thinking based on the discussion to-date.
It also summarizes a few posts from comp.lang.python.
Hopefully, it will serve to focus the discussion on the
best of the ideas and arguments presented so far.
* Out of order evaluation is out of favor.
* So are ideas that do not provide for short-circuiting.
* (if <condition>: <expression1> else: <condition2>) is in vogue.
* <condition> ?? <expression1> || <expression2> is a new contender.
* cond(<condition>, <expression1>, <condition2>) is viable if implemented
as a keyword and has short-circuit behavior. Note, the actual word
is still an open question. iif() got shot down quickly.
* Added a summary of a few ideas from the last couple hundred posts
More information about the Python-list