title: python3 : Getting unordered elements after using set. Why, how?
body: <p><br/>
  One of my friend asked me, why when he uses list(set(False, 0, True, 1)), he gets [0, 1]? I explained him that bool is subclass of int and bool doesn't redefinned <strong>__eq</strong>__ method of int object.<br/>
  I go deeper for the exemple and I redefinned <strong>__eq</strong>__ method of int object, here is the code: 
  
  <pre><code>class AnotherInt(int):
      def __eq__(self, other):
          return (type(other) is int and super(AnotherInt, self).__eq__(other))
      __hash__ = int.__hash__
  </code></pre>
  
  <p>The thing is I get unordered elements (I mean, not the same order as the source) after executing some instructions. Here are the code:<br/></p>
  
  <pre><code>mylist = [AnotherInt(0), False, False, AnotherInt(1), True, True, AnotherInt(2), 2, AnotherInt(3), 3, AnotherInt(4)]
  # mylist : [0, False, False, 1, True, True, 2, 2, 3, 3, 4]
  list(set(mylist))
  # result : [0, False, 2, 1, True, 3, 4]
  </code></pre>
  
  <p>I got that result instead of <strong>[0, False, 1, True, 2, 3, 4]</strong><br/>
  is someone can explain me why?<br/>
  PS: I use python 3.6.9; gcc 8.3.0</p>