A = X > Y ? X : Y
Michal Wallace
sabren at manifestation.com
Wed Feb 9 12:03:51 EST 2000
Stidolph, David wrote in message
<11A17AA2B9EAD111BCEA00A0C9B41793034AB159 at molach.origin.ea.com>...
>I would think that this would be better because it eliminates a local
>variable assignment.
>
>def iif( condition, first, second ):
> if condition:
> return first
> else:
> return second
Yeah, that would be faster. I just try to stay in the habit of only having
one "return"
per function, and always at the end..
-Michal
More information about the Python-list
mailing list