<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 3/19/2010 12:50 PM, Mark Dickinson wrote:
<blockquote
 cite="mid:5c6f2a5d1003191250sd61106fma0db83880fda0b1e@mail.gmail.com"
 type="cite">
  <pre wrap="">Hah.  This is a very good point, and one I'd somehow missed up until
now.  I don't think we <b class="moz-txt-star"><span class="moz-txt-tag">*</span>can<span
 class="moz-txt-tag">*</span></b> reasonably make equality comparisons
raise NotImplemented (in either 2.x or 3.x), since that messes up
containment tests:  something like "1.0 in {2, Decimal(3)}" would
raise a TypeError instead of correctly returning False.  (So the patch
I've put on the issue tracker is wrong, since it does raise TypeError
for equality and inequality, as well as for &lt;, &gt;, &lt;= and &gt;=.)
  </pre>
</blockquote>
<br>
Sounds to me like containment checking is wrong; that if it gets an
exception during the comparison that it should assume unequal, rather
than aborting, and continue to the next entry.<br>
<br>
Wouldn't the same issue arise for containment tests when disparate,
incomparable objects are included in the same set?  Why is this
different?<br>
</body>
</html>