conditional expressions

Erik Max Francis max at alcyone.com
Wed Sep 25 07:46:16 CEST 2002


Greg Ewing wrote:

> Personally, I rather like
> 
>     a if b else c
> 
> but Guido doesn't like that either, unfortunately.
> 
> Perhaps I'll slip it into Pyrex when no-one's looking...:-)

I went ahead and added one in empy, since it caused no conflicts;
@(expression) can be used for embedding expressions, and so @(test ?
thenExpression : elseExpression) can be used for embedding conditional
expressions.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Music washes away from the soul the dust of everyday life.
\__/ Berthold Auerbach
    7 Sisters Productions / http://www.7sisters.com/
 Web design for the future.



More information about the Python-list mailing list