Unexpected behaviour from the 'in' operator

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Tue Feb 25 04:15:03 CET 2003

Rene Pijlman wrote:
> If this is true I guess the equality operator could be optimized
> to first check for identity, and only test non-identical objects
> for equality.

That would be a semantic change. Currently it's possible
to create an object that is not == to itself; if the
above optimisation were made, this wouldn't work

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list