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

gvwilson@nevex.com gvwilson@nevex.com
Mon, 31 Jan 2000 22:13:07 -0500 (EST)


> Moshe Zadka wrote:
> Seriously, I disagree with the basic premise of you and Jim: you can
> *already* have control structures inside experessions with and/or, so
> even for Jim's twisted meanings for "add new functionality to the
> language" it's not true.

Have you ever tried to teach this to relatively experienced programmers
(never mind novices) whose background is Fortran, Modula-2, Ada, or
anything other than C/C++/Java?  It's *really* hard to get the idea
across. I tried it in the first Python course I taught at LANL, and wound
up spending 15 minutes trying to unconfuse people (and failed). Afterward,
one guy said that it made even less sense than using integer offsets to
fake linked lists in Fortran-77...

Greg