relational/boolean operator overloading -> PEP 207

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Mar 20 21:22:30 EST 2001


Aahz Maruch wrote:
> 
>     5 In the current proposal, when A<B returns an array of
>       elementwise comparisons ... its interpretation as Boolean by 
>       the shortcut operators raises an exception.

That's a special case, though. In general, obj1 and obj2 will do 
the same as it does now on arbitrary objects -- i.e. evaluate to 
obj2 if obj1 is considered "true", otherwise obj1.

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list