PEP 308: Alternative conditional operator forms

holger krekel pyth at
Mon Feb 10 18:17:55 CET 2003

Aahz wrote:
> In article <3E46F0CE.5675E180 at>,
> Erik Max Francis  <max at> wrote:
> >
> >What else should be on this list?  (You can reply by email if you wish.)
> iif(C, x, y)
> No, that's not a short-circuiting form.

which is rarely needed.  Tim Peters <wink> said that with the hundred 
cases of the beloved "x and y or z" idiom in the 150+ modules of 
Python it's needed exactly 0 (zero) times. 

If nobody comes up with sane *real world* use cases for the 
short-circuiting behaviour then we should call YAGNI 
and not change any syntax.  A C-implemented builtin 
isn't really that bad. 

leaning-towards-a-builtin-ly y'rs,


More information about the Python-list mailing list