title: Python set().issubset() not working as expected
body: <p>I'm trying to use <code>set().issubset()</code> for comparison of sequences. As you can imagine, it's not working as expected ;) In advance: sorry for the long code-blob.</p>
  
  <pre><code>class T(object):
    def __init__(self, value, attributes = None):
      self.value = value
      self.attributes = Attributes(attributes)
  
    def __eq__(self, other):
      if not isinstance(other, T):
        return False
      if self.value == other.value and self.attributes == other.attributes:
        return True
      else:
        return False
  
    def __ne__(self, other):
      if not isinstance(other, T):
        return True
      if self.value != other.value or self.attributes != other.attributes:
        return True
      else:
        return False
  
  class Attributes(dict):
    def __init__(self, attributes):
      super(dict, self)
      self.update(attributes or dict())
  
    def __eq__(self, other):
      if self.items() == other.items():
        return True
      else:
        return False
  
    def __ne__(self, other):
      if not self.items() == other.items():
        return True
      else:
        return False
  
    def __cmp__(self, other):
      return self.items().__cmp__(other.items())
  
  
  x = [T("I", {'pos': 0}), T("am", {'pos': 1}), T("a", {'pos': 2}), T("test", {'pos': 3})]
  y = [T("a", {'pos': 2}), T("test", {'pos': 3})] 
  xx = set(x)
  yy = set(y)
  
  assert y[0] == x[2], "__eq__ did fail, really?" #works
  assert y[1] == x[3], "__eq__ did fail, really?" #works
  assert xx-(yy-xx) == xx, "set subtract not working" #works, but is nonsense. see accepted answer
  assert not xx.issubset(yy), "i am doing it wrong..." #works
  assert yy.issubset(xx), "issubset not working :(" #FAILS!
  </code></pre>
  
  <p>Running above code fails the last assertion:</p>
  
  <pre><code>$ python
  Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import issubsettest
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "issubsettest.py", line 52, in &lt;module&gt;
      assert yy.issubset(xx), "issubset not working :("
  AssertionError: issubset not working :(
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>What am I missing here?</p>