Conditional operator in Python?
Erik Max Francis
max at alcyone.com
Sun Apr 1 00:47:10 EST 2001
Ben Wolfson wrote:
> Easily, if unreadably, solved: (condition and (a,) or (b,))[0]
Sure, but unfortunately the unreadable part defeats the whole purpose
for wanting a conditional operator in the first place :-).
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ If I had known, I would have become a watchmaker.
\__/ Albert Einstein
blackgirl international / http://www.blackgirl.org/
The Internet resource for black women.
More information about the Python-list
mailing list