title: HashSet problem -- equals and hashCode with contains working differently than I'd expect
body: <p>I have the following code:</p>
  
  <pre><code>class IncidentTag:
       def __init__(self,tag):
          self.tag = tag
       def equals(self,obj):
          return self.tag.equals(obj.tag)
       def hashCode(self):
          return self.tag.hashCode()
  
  from java.lang import String
  from java.util import HashMap
  from java.util import HashSet
  
  tag1 = IncidentTag(String("email"))
  tag1copy = IncidentTag(String("email"))
  tag2 = IncidentTag(String("notemail"))
  
  print tag1.equals(tag1copy)
  print tag2.equals(tag2)
  
  print "Now with HashSet:"
  
  hSet = HashSet()
  hSet.add(tag1)
  hSet.add(tag2)
  
  print hSet.contains(tag1)
  print hSet.contains(tag2)
  print hSet.contains(tag1copy)
  </code></pre>
  
  <p>The output is:
  1
  1
  Now with HashSet:
  1
  1
  0</p>
  
  <p>However, I would have expected the last line to be <code>true</code>(1) as well.  Is there something obvious that I am missing.</p>
  
  <p>(yes, I know that my <code>equals</code> method and <code>hashcode</code> methods do not take some issues into account... they are deliberately simple, but do let me know if the issues there are causing this problem.)</p>