A = X > Y ? X : Y

Fredrik Lundh effbot at telia.com
Thu Feb 10 03:09:22 EST 2000


Bob Alexander <bobalex at home.com> wrote:
> The only true equivalent to this C/C++/Java/<name your c-like syntax
> language code in Python is:
>
> if X > Y:
>   temp = Y
> else:
>   temp = X
> A = temp
>
> This evaluates only one of its selected expressions, and evaluates A only
> once.

you're using quantum python, right?

</F>





More information about the Python-list mailing list