[Python-Dev] Re: ANN: PEP 335: Overloadable Boolean
Operators
Phillip J. Eby
pje at telecommunity.com
Wed Sep 15 17:56:31 CEST 2004
At 11:48 PM 9/14/04 -0700, Tim Hochberg wrote:
>Again with Greg's proposal one could write 'a and b' for this. Much nicer.
>
>It's not that you couldn't make numarrays short circuit. In the expression
>"a and b", if all the elements of a are false, then we can skip evaluating
>b. I'm just not sure that this is a good idea.
My point is that the idea of using 'and' in order to implement something
that's *not* short-circuiting seems like a bad idea. I'd rather see
array-specific operators added, or some sort of infix notation for
functions so that you can define custom operators for such specialized usages.
More information about the Python-Dev
mailing list