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

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

Guido van Rossum <guido at> wrote in message news:<mailman.1044638179.4983.python-list at>...
> 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 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