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

Fred L. Drake, Jr. fdrake@acm.org
Tue, 1 Feb 2000 11:42:44 -0500 (EST)


Greg Stein writes:
 > 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)

  Actually, the places I'd use it most would be probably be in
constructing parameters to string formatting operations.  Grepping
back in my memory, that's usually where I've wanted it.
  I very rarely use lambda, and usually change it on the next
iteration on those cases when I do.


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives