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

Roy Smith roy at panix.com
Sat Feb 8 18:39:04 EST 2003


Evan <evan at 4-am.com> wrote:

> Here's a totally new direction: let's get rid of the chaining and 
> precedence issues, and make an n-way conditional, not a ternary.
> 
> {if cond1: expr1, default}
> {if cond1: expr1, cond2: expr2, default}

I'm not sure I like the idea, but assuming I did, I think it would be 
better to have an explicit else: instead of the bare dangling default 
clause.




More information about the Python-list mailing list