Does Python need a semantics for and/or over generators ? was : 'xor' operator?
Grant Edwards
grante at visi.com
Mon Apr 15 11:41:44 EDT 2002
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. There is no possibly way to
short-circuit the expression so that only one is evaluated.
--
Grant Edwards grante Yow! I'm protected by
at a ROLL-ON I rented from
visi.com AVIS...
More information about the Python-list
mailing list