title: Python create own dict view of subset of dictionary
body: <p>As the many questions on the topic here on SO attest, taking a slice of a dictionary is a pretty common task, with a fairly nice solution:</p>
  
  <pre><code>{k:v for k,v in dict.viewitems() if some_test(k,v)}
  </code></pre>
  
  <p>But that creates a new dictionary, with its own mappings. For many operations, it would be nice to just have an immutable view of the original dict (i.e. it does not support assignment or deletion operations on the view). Implementing such a type is probably easy, but it's not good to have a proliferation of local utility classes.</p>
  
  <p><strong>So, my question is:</strong> is there a built-in way of obtaining such a "subset view"? Or is there a third-party library (preferably available via PyPi) that provides a good implementation of such a utility?</p>