title: Check if object is in list (not "by value", but by id)
body: <p>Consider the following code:</p>
  
  <pre><code>&gt;&gt;&gt; class A(object):
  ...   def __init__(self, a):
  ...     self.a = a
  ...   def __eq__(self, other):
  ...     return self.a==other.a
  ... 
  &gt;&gt;&gt; a=A(1)
  &gt;&gt;&gt; b=A(1)
  &gt;&gt;&gt; c=A(2)
  
  &gt;&gt;&gt; a==b
  True                   # because __eq__ says so
  &gt;&gt;&gt; a==c
  False                  # because __eq__ says so
  &gt;&gt;&gt; a is b
  False                  # because they're different objects
  
  &gt;&gt;&gt; l = [b,c]
  &gt;&gt;&gt; a in l
  True                   # seems to use __eq__ under the hood
  </code></pre>
  
  <p>So, <code>in</code> seems to use <code>__eq__</code> to determine whether or not something is in a container.</p>
  
  <ol>
  <li>Where can one find documentation on this behavior?</li>
  <li>Is it possible to make <code>in</code> use object identity, a.k.a. <code>a in somelist</code> if the object <code>a</code> is in <code>somelist</code>, and not some other object that compares equal to <code>a</code>?</li>
  </ol>