PEP 308: Alternative conditional operator forms
holger krekel
pyth at devel.trillke.net
Mon Feb 10 12:17:55 EST 2003
Aahz wrote:
> In article <3E46F0CE.5675E180 at alcyone.com>,
> Erik Max Francis <max at alcyone.com> 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,
holger
More information about the Python-list
mailing list