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

Erik Max Francis max at
Sat Feb 8 09:23:58 CET 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 /
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Ten lands are sooner known than one man.
\__/ (a Yiddish proverb) Aliens vs. Predator 2 /
 A personal guide to Aliens vs. Predator 2.

More information about the Python-list mailing list