My guess is this won't have the speed advantage of ?: in C-ish languages, but it's still convenient for conciseness. I'll post a speed comparison later.
Code:
Code:
def qco(switch, v1, v2):
return {True : v1, False : v2}[bool(switch)]
#example
def max(v1, v2)
return qco(v1 > v2, v1, v2)