Equivalent to (a ? b : c) ?

Magnus L. Hetland mlh at vier.idi.ntnu.no
Tue Dec 21 12:38:26 EST 1999


James Logajan <JamesL at Lugoj.Com> writes:

> I think you spelled "idiotic" incorrectly. (Sorry, cheap shot.)

More like "lame shot" ;)

> I don't have a dictionary in front of me, but I'm pretty sure that
> by definition an idiom can not be unilaterally declared.

I never claimed it could. It is not something I invented myself. I was
actually referring to the use of short-circuit logic operators for
implementing conditional expressions in general. As far as I have been
able to gather in the last couple of years it is idiomatic. Feel free
to disagree, or to dislike it.

--

  Magnus
  Lie
  Hetland



More information about the Python-list mailing list