Ron_Adam wrote:
I've used boolean opperations to do it.
result = (v == value) * first + (v != value) * second
Same as:
if v == value: result = first else: result = second
No, it isn't, because it isn't short circuiting. If first or second had side effects, then the two would not be equivalent.
-- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis If the sun comes up / And you're not home / I'll be strong -- India Arie -- http://mail.python.org/mailman/listinfo/python-list