For review: PEP 308 - If-then-else expression

damien morton morton at dennisinter.com
Sat Feb 8 01:26:23 CET 2003


Guido van Rossum <guido at python.org> wrote in message news:<mailman.1044638179.4983.python-list at python.org>...
> Given that if-then-else expressions keep being requested, I hereby put
> forward a proposal.  I am neutral on acceptance of the proposal; I'd
> like the c.l.py community to accept or reject it or come up with a
> counter-proposal.  Please understand that I don't have a lot of time
> to moderate the discussion; I'll just wait for the community to
> discuss the proposal and agree on some way to count votes, then count
> them.

+1 on adding ternary if expressions.

Prefer the "if <cond> then <expr> else <expr>" form to the "<expr> if
<cond> else <expr>" form. Could live with either.




More information about the Python-list mailing list