[Python-Dev] Conditional expressions and sequences
Paul Prescod
paul@ActiveState.com
Tue, 16 Oct 2001 12:12:40 -0700
Skip Montanaro wrote:
>
>...
>
> Unfortunately, that requires both t and f to be evaluated.
Perhaps not. What if the __where__ function was passed two callable
objects representing closures?
if x then y else z -> x.__where__(lambda: y, lambda: z)
I'm not saying I'm necessarily in favor of __where__. It is a kind of
innovative and I haven't thought through all of the issues.
Paul Prescod