[Python-Dev] Adding C ternary select (a?b:c) to Python?

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Mon, 31 Jan 2000 12:33:25 -0500 (EST)


Put me in the camp of "yeah, occasionally I wish I had it, but I can
always hack around it, and the C syntax just blows".  I'm sure if it's
wedgeable into CPython it would also be in JPython, but I dislike ?:
syntax enough to vote strongly against it for CPython 1.6.

A Forth-ish syntax might be more acceptable

    x = y > z if y else z

but come on!  You'll give ordinarily dandruff-free Python programmers
plenty of other reasons to scratch their heads with this one.

head-and-shoulders-above-the-rest-ly y'rs,
-Barry