title: How do I avoid a "TypeError: unhashable type: 'dict'" when computing list differences?
body: <p>I'm using Python 3.8.  I have two lists, with each element being a dict ...</p>
  <pre><code>&gt;&gt;&gt; existing_dicts = [{&quot;id&quot;: 1}, {&quot;id&quot;: 2}]
  &gt;&gt;&gt; cur_dicts = [{&quot;id&quot;: 2}]
  </code></pre>
  <p>I wanted to find the dicts that were no longer in &quot;cur_dicts&quot; that were originally in &quot;existing_dicts&quot;.  So in the above example,</p>
  <pre><code>{&quot;id&quot;: 1}
  </code></pre>
  <p>is my desired result since it is in &quot;existing_dicts&quot; but not in &quot;cur_dicts&quot;.  I tried the below to find the difference ...</p>
  <pre><code>&gt;&gt;&gt; deleted_dicts = list(set(existing_dicts) - set(cur_dicts))
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  TypeError: unhashable type: 'dict'
  </code></pre>
  <p>What's a better way to do this?</p>