PEP 308 - ternary operator

Erik Max Francis max at alcyone.com
Tue Feb 11 21:01:55 EST 2003


Raymond Hettinger wrote:

> "Erik Max Francis" wrote:
>
> > Both of these forms [`C ? x : y' and `iif(C, x, y)' without
> > short-circuiting] have been explicitly rejected by the BDFL,
> > although
> > for different reasons; check the current state of the PEP.
> 
> Actually, he's wavering on both.

I'm not seeing any wavering.  "The BDFL rejected this for several
reasons ..." on the first, and "This won't work ..." for the second,
along with a section titled "Short-Circuit Behavior" which ends, "The
BDFL's position is that short-circuit behavior is essential for an
if-then-else construct to be added to the language."

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Being in love for real / It ain't like a movie screen
\__/ India Arie
    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