Andrew Channels Dexter Pinion

Wherein I write some stuff that you may like to read. Or not, its up to you really.

July 03, 2003

No Ternary Operator

Its official, there will be no ternary operator in Python.

Feel free to take the streets to celebrate, or whatever activity you feel is appropriate.

Posted by Andy Todd at July 03, 2003 10:18 AM

Comments

Hmmm. Good, I think.

http://www.brunningonline.net/simon/blog/archives/000622.html

Posted by: Simon on July 3, 2003 11:27 AM

I mean really, people ... is it that hard to write if/else ?

Posted by: Joe Grossberg on July 3, 2003 01:50 PM

It is in a lambda, yes. But then I avoid those too...

Posted by: Simon on July 3, 2003 01:56 PM

And in list comprehensions too, I suppose, if someone adamantly refuses to create a method containing that if/else and two return values.

Posted by: Joe Grossberg on July 3, 2003 01:59 PM