For review: PEP 308 - If-then-else expression
Aahz
aahz at pythoncraft.com
Sat Feb 8 11:54:20 EST 2003
In article <mailman.1044638179.4983.python-list at python.org>,
Guido van Rossum <guido at python.org> wrote:
>
> The proposed syntax is as follows:
>
> <expression1> if <condition> else <expression2>
I've been flipping between -1 and +1 (going through -0 and +0) as various
arguments are put forth. What's put me mostly in the -1 camp is the use
of the ternary operator in an if statement. That's just too ugly for
words. I would be willing to abstain from (or possibly even vote for) a
proposal that reads left-to-right *and* doesn't muck with the if
statement. So far, the only proposals that work on those grounds are
<cond> ? <exp1> : <exp2>
and
when <cond> then <exp1> else <exp2>
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Register for PyCon now! http://www.python.org/pycon/reg.html
More information about the Python-list
mailing list