PEP 308: Alternative conditional operator forms
pyth at devel.trillke.net
Mon Feb 10 18:17:55 CET 2003
> 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.
More information about the Python-list