{"action":"created","issue":{"url":"https://api.github.com/repos/simonpercivall/orderedset/issues/8","labels_url":"https://api.github.com/repos/simonpercivall/orderedset/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/simonpercivall/orderedset/issues/8/comments","events_url":"https://api.github.com/repos/simonpercivall/orderedset/issues/8/events","html_url":"https://github.com/simonpercivall/orderedset/issues/8","id":129003721,"number":8,"title":"superset behavior is not same as set","user":{"login":"handloomweaver","id":456254,"avatar_url":"https://avatars.githubusercontent.com/u/456254?v=3","gravatar_id":"","url":"https://api.github.com/users/handloomweaver","html_url":"https://github.com/handloomweaver","followers_url":"https://api.github.com/users/handloomweaver/followers","following_url":"https://api.github.com/users/handloomweaver/following{/other_user}","gists_url":"https://api.github.com/users/handloomweaver/gists{/gist_id}","starred_url":"https://api.github.com/users/handloomweaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handloomweaver/subscriptions","organizations_url":"https://api.github.com/users/handloomweaver/orgs","repos_url":"https://api.github.com/users/handloomweaver/repos","events_url":"https://api.github.com/users/handloomweaver/events{/privacy}","received_events_url":"https://api.github.com/users/handloomweaver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-27T02:02:34Z","updated_at":"2016-01-27T07:39:47Z","closed_at":null,"body":"There seems to be a bug around subset/superset. If using 2 orderedsets it does not behave as 2 sets do. If using 1 orderedset and an ordinary set it behaves as you'd expect. I've written a lot of code that uses this library and I'm about to push into production. Can you get this fixed asap? Please\r\n\r\n     #Ordinary Set subset:\r\n     In [33]: a = set()\r\n     In [34]: b = set()\r\n     In [35]: a.add(1)\r\n     In [36]: a.add(2)\r\n     In [37]: a.add(3)\r\n     In [38]: b.add(2)\r\n     In [39]: b.add(3)\r\n     In [40]: b <= a\r\n     Out[40]: True\r\n\r\n     #OrderedSet to OrderedSet subset:\r\n     In [41]: a = OrderedSet()\r\n     In [42]: b = OrderedSet()\r\n     In [43]: a.add(1)\r\n     In [44]: a.add(2)\r\n     In [45]: a.add(3)\r\n     In [46]: b.add(2)\r\n     In [47]: b.add(3)\r\n     In [48]: b <= a\r\n     Out[48]: False\r\n\r\n     #OrderedSet to set subset:\r\n     In [3]: a = OrderedSet()\r\n     In [4]: a.add(1)\r\n     In [5]: a.add(2)\r\n     In [6]: a.add(3)\r\n     In [7]: b = set()\r\n     In [8]: b.add(2)\r\n     In [9]: b.add(3)\r\n     In [10]: b <= a\r\n     Out[10]: True"},"comment":{"url":"https://api.github.com/repos/simonpercivall/orderedset/issues/comments/175465518","html_url":"https://github.com/simonpercivall/orderedset/issues/8#issuecomment-175465518","issue_url":"https://api.github.com/repos/simonpercivall/orderedset/issues/8","id":175465518,"user":{"login":"simonpercivall","id":153659,"avatar_url":"https://avatars.githubusercontent.com/u/153659?v=3","gravatar_id":"","url":"https://api.github.com/users/simonpercivall","html_url":"https://github.com/simonpercivall","followers_url":"https://api.github.com/users/simonpercivall/followers","following_url":"https://api.github.com/users/simonpercivall/following{/other_user}","gists_url":"https://api.github.com/users/simonpercivall/gists{/gist_id}","starred_url":"https://api.github.com/users/simonpercivall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonpercivall/subscriptions","organizations_url":"https://api.github.com/users/simonpercivall/orgs","repos_url":"https://api.github.com/users/simonpercivall/repos","events_url":"https://api.github.com/users/simonpercivall/events{/privacy}","received_events_url":"https://api.github.com/users/simonpercivall/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T07:39:47Z","updated_at":"2016-01-27T07:39:47Z","body":"So the difference is this: An OrderedSet compared to another OrderedSet cares about order, which means that comparisons against other ordered collections _also_ cares about order. So in this regard, an OrderedSet compares more like a list than a set, when using the \"less than or equal\" operator. (Of course, it is wrong that the `issubset` method, which is implemented by using that operator, also behaves like a list comparison.)\r\n\r\nTLDR: I'm not entirely sure that it wouldn't _also_ be a bug to make comparisons behave more like set comparisons than list comparisons."}}