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

Bjorn Pettersen BPettersen at NAREX.com
Fri Feb 7 16:45:37 EST 2003


> From: Sean Ross [mailto:frobozz_electric at hotmail.com] 
> 
> >
> >     The proposed syntax is as follows:
> >
> >         <expression1> if <condition> else <expression2>
> >
> 
> While I do not think this is necessary, I would like to offer 
> an alternative
> syntax:
> 
>     <expression1> when <condition> else <expression2>
[...]
> Although adding a keyword is often a bad thing...

In fact, most of the time it makes it a non-starter. FWIW, I don't think
it is significantly better than if either (sorry).

-- bjorn





More information about the Python-list mailing list