For review: PEP 308 - If-then-else expression
Erik Max Francis
max at alcyone.com
Sun Feb 9 02:10:11 EST 2003
Paul Moore wrote:
> Actually, in C, I often find that I *can't* use the ternary operator,
> because what I want is a default. So
>
> x = y or default
>
> is more useful to me. (But Python already has that).
Except when y might evaluate as false.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Always forgive your enemies -- nothing annoys them so much.
\__/ Oscar Wilde
Bosskey.net: Quake III Arena / http://www.bosskey.net/q3a/
A personal guide to Quake III Arena.
More information about the Python-list
mailing list