python: find only common key-value pairs of several dicts: dict intersection
<p>I have 0 or more dicts in a list:</p>

<pre><code>&gt;&gt;&gt; dicts = [dict(a=3, b=89, d=2), dict(a=3, b=89, c=99), dict(a=3, b=42, c=33)]
</code></pre>

<p>I want to create a new dict that contains only keys that are in <strong>all</strong> the above dicts, and only if the values are all the same:</p>

<pre><code>&gt;&gt;&gt; dict_intersection(*dicts)
{"a": 3}
</code></pre>

<p>I feel that there should be an <em>elegant</em> way of writing <code>dict_intersection</code>, but I'm only coming up with inelegant and/or inefficient solutions myself. Suggestions?</p>
