Python - question about hashes and `None`
<p>Why does <code>None</code> hash to <code>-1042159082</code> (which I found to be equal to number of bytes in a Gigabyte negated)?</p>

<p>I realize this doesn't really effect my code, but I'm curious.</p>

<p>Hashes are used for dictionary key look-ups, so I decided to experiment:</p>

<pre><code>&gt;&gt;&gt; D = {-1042159082: 'Hello', None: 'Hi'}
&gt;&gt;&gt; D[None]
'Hi'
&gt;&gt;&gt; D[-1042159082]
'Hello'
&gt;&gt;&gt;
</code></pre>

<p>I understand this as Python seeing two identical hashes and then checking type to see what's what. Is that right?</p>

<pre><code>&gt;&gt;&gt; {False: 'Hello', 0: 'Hi'}
{False: 'Hi'}
&gt;&gt;&gt; {0: 'Hi', False: 'Hello'}
{0: 'Hello'}
</code></pre>

<p>This is just weird. What's more is that the first key is kept and the second value is kept.</p>

<p>Is this sorcery, or could somebody help me understand?</p>
