Conditional operator in Python?

Erik Max Francis max at alcyone.com
Thu Sep 6 22:49:46 EDT 2001


Marcin 'Qrczak' Kowalczyk wrote:

> What about:
> 
>     if X: Y else: Z
> 
> There is no conceptual conflict with the statement if, because when
> a statement can be understood in both ways, they have the same effect
> anyway. I'm only not sure if it's easy to parse using current Python
> parser.

That looks good to me.  Now who's up for a PEP?

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Success and failure are equally disastrous.
\__/ Tennessee Williams
    Interstelen / http://www.interstelen.com/
 A multiplayer, strategic, turn-based Web game on an interstellar scale.



More information about the Python-list mailing list