hash() returning different values on different OSs
<p>When python builtin <code>hash()</code> is just wired cross-platform. I have an app use builtin <code>hash()</code> for <code>'test'</code>. Both systems are 64bit, python 2.7.12</p>

<p>windows:</p>

<pre><code>&gt;&gt;&gt; hash('test')
1308370872
</code></pre>

<p>linux:</p>

<pre><code>&gt;&gt;&gt; hash('test')
2314058222102390712
</code></pre>

<p>Why is this?</p>

<p>There are no guarantees about the value <code>hash</code> returns in Python.  It appears that you're using a 32-bit Windows Python (that's a guess), and that you're using a 64-bit python on linux (again, a guess).  IIRC (and I haven't checked), The default <code>hash(item)</code> returns the address of <code>item</code> as its hash value.</p>

<p>If you want to have values you can compare across operating systems, look at <a href="https://docs.python.org/3.5/library/hashlib.html?highlight=hashlib" rel="nofollow">hashlib</a>.</p>

python python-2.7 hash python-internals