For review: PEP 308 - If-then-else expression

Erik Max Francis max at alcyone.com
Sat Feb 8 03:23:58 EST 2003


Jp Calderone wrote:

>   Sorry, I must have missed that part of the thread :)  I'm a big fan
> of
> short-circuit, just not a big fan of adding a ternary operator.  If
> you need
> it that badly, write a function (No, it isn't current impossible, it's
> just
> odd-looking).

You can't get short circuiting behavior by writing a function, unless
you want to do obtuse things like alternately eval different passed-in
strings in the function.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Ten lands are sooner known than one man.
\__/ (a Yiddish proverb)
    Bosskey.net: Aliens vs. Predator 2 / http://www.bosskey.net/avp2/
 A personal guide to Aliens vs. Predator 2.




More information about the Python-list mailing list