title: Compare dictionaries ignoring specific keys
body: <p>How can I test if two dictionaries are equal while taking some keys out of consideration. For example,</p>
  
  <pre><code>equal_dicts(
      {'foo':1, 'bar':2, 'x':55, 'y': 77 },
      {'foo':1, 'bar':2, 'x':66, 'z': 88 },
      ignore_keys=('x', 'y', 'z')
  )
  </code></pre>
  
  <p>should return True.</p>
  
  <p>UPD: I'm looking for an efficient, fast solution.</p>
  
  <p>UPD2. I ended up with this code, which appears to be the fastest:</p>
  
  <pre><code>def equal_dicts_1(a, b, ignore_keys):
      ka = set(a).difference(ignore_keys)
      kb = set(b).difference(ignore_keys)
      return ka == kb and all(a[k] == b[k] for k in ka)
  </code></pre>
  
  <p>Timings: <a href="https://gist.github.com/2651872" rel="noreferrer">https://gist.github.com/2651872</a></p>