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

Greg Stein gstein@lyra.org
Mon, 31 Jan 2000 23:15:04 -0800 (PST)


On Mon, 31 Jan 2000, Ka-Ping Yee wrote:
> On Mon, 31 Jan 2000, Tim Peters wrote:
>...
> > No keyword has been added to Python since "lambda", and you can be certain
> > Guido will never add another (at least not to Python1) -- this is an
> > absolute non-starter.  Ping, *you* used to know this better than anyone
> > <wink>.
> 
> Okay, okay.  You probably have a better memory about this than i do. :)

Actually, Tim's memory is failing. "assert" was added in 1.5.  :-)

Not that this adds to the debate at all :-), but I figured that I am
obligated to knock a chair leg out from under Tim every now and then.

Cheers,
-g

p.s. I'm against a ternary operator. use an if/else statement. use
def instead of lambda (lambda is the only rational basis given so far to
add the operator, but it is bogus to start with)

-- 
Greg Stein, http://www.lyra.org/