something like "if" that returns a value?
Paul Rudin
paul.rudin at ntlworld.com
Tue Nov 12 02:31:57 EST 2002
>>>>> "John" == John Roth <johnroth at ameritech.net> writes:
John> The 'and' 'or' hack is the cannonical way of doing this. It
John> short circuits properly, and it returns the value of the
John> expression that was evaluated.
But it doesn't always short circuit properly, does it? x and y or z,
will evaluate both of y and z in some circumstances.
More information about the Python-list
mailing list