title: hashing different tuples in python give identical result
body: <p>I'm working with sets of integer matrices, and I thought representing them as tuples made sense, as they are hashable. However the hash() function gave me strange results for tuples:</p>
  
  <pre><code>hash(((1, -1, 0), (1, 0, 0), (1, 0, -1)))
  
  Out[147]: -697649482279922733
  
  hash(((1, 0, -1), (1, 0, 0), (1, -1, 0)))
  
  Out[148]: -697649482279922733
  </code></pre>
  
  <p>As you can see, these two different tuples have the same hash value. Note that they are actually pretty similar (exchange of the first and last subtuples), however I couldn't find a more minimal example: <code>((0,1),(0,0))</code> and <code>((0,0),(0,1))</code> have different hash values for example.</p>
  
  <p>Any clue of what's going on? I  can't believe that it's just incredibly bad luck... Now that I have found where the problem is I could bypass it easily, but I thought it was worth mentioning here anyway.</p>