Conditional operator in Python?

Erik Max Francis max at alcyone.com
Tue Sep 4 12:21:15 EDT 2001


Marcin 'Qrczak' Kowalczyk wrote:

> The biggest problem is that 'then' is not currently a keyword.
> 
> (Or maybe a larger problem is opposition of some people which decide
> or are respected in such issues...)

Maybe something like

	if X return Y else Z

I wouldn't be averse to introducing a new keyword for this purpose, but
if that's the stumbling block, it seems that a preexisting keyword can
be used in this context that will work just as well.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ To love without criticism is to be betrayed.
\__/ Djuna Barnes
    The laws list / http://www.alcyone.com/max/physics/laws/
 Laws, rules, principles, effects, paradoxes, etc. in physics.



More information about the Python-list mailing list