title: Why are set methods like .intersection() not supported on set-like objects?
body: <p>In Python 3.7, I'd like to calculate the intersection of two dictionaries' keys. To do this, I'd like to call the <code>.intersection()</code> method on their <code>keys()</code>, however it does not work.</p>
  
  <p>.keys() produces a set-like object, however most set methods don't work on it. What works however is the extremely unknown bitwise operator overloads for set-like objects, like <code>&amp;</code>. </p>
  
  <pre><code>m = {'a':1, 'b':2}
  n = {'b':3, 'c':4}
  
  m.keys().intersection(n.keys())  # Pythonic, but doesn't work
  
  m.keys() &amp; n.keys()  # works but not readable
  
  set(m.keys()).intersection(set(n.keys()))  # works, readable, but too verbose
  </code></pre>
  
  <p>I find that the <code>&amp;</code> overload on a set-like object is extremely rarely used and is not known by most programmers. Method names like <code>.intersection()</code> or <code>.union()</code> is self-documenting and definitely more Pythonic by this definition.</p>
  
  <p>Why isn't it supported then? Even the <a href="https://docs.python.org/3/library/stdtypes.html?highlight=set#frozenset.intersection" rel="nofollow noreferrer">documentation</a> lists the <code>&amp;</code> and <code>.intersection()</code> methods like aliases, not mentioning that only <code>&amp;</code> is supported on set-like objects.</p>
  
  <p><em>note:</em> For some reason, in IPython the autocomplete lists <code>.isdisjoin()</code> as a method which is available on <code>dict.keys()</code>. Out of the 17 set methods, 1 is present.</p>