Does Python need a semantics for and/or over generators ? was : 'xor' operator?
Boris Borcic
borcis at geneva-link.ch
Tue Apr 16 02:42:30 EDT 2002
Grant Edwards wrote:
> In article <3CBABA71.3040909 at geneva-link.ch>, Boris Borcic wrote:
>
>
>>For the shortcut semantics, we'd like to have :
>> a xor b
>>
>>behave exactly like :
>> (not b and a) or (not a and b)
>>
>
> I don't understand how that's a shortcut (assuming that means
> the same thing as short-circuit). You have to evaluate both
> operands of an xor operator.
That's right, the shortcut is in confusing short-circuit semantics
with returning operands when possible. In any case, my question
was elsewhere as the renaming of the thread suggested.
Boris Borcic
--
python >>> assert 304 in 340343, "P424D15E M15M47CH E2202"
More information about the Python-list
mailing list