title: Is there a better way to store a twoway dictionary than storing its inverse separate?
body: <p>Given a one-to-one dictionary (=bijection) generated à la</p>
  
  <pre><code>for key, value in someGenerator:
       myDict[key] = value
  </code></pre>
  
  <p>an inverse lookup dictionary can be trivially created by adding</p>
  
  <pre><code>    invDict[value] = key
  </code></pre>
  
  <p>to the <code>for</code> loop. But is this a Pythonic way? Should I instead write a <code>class Bijection(dict)</code> which manages this inverted dictionary in addition and provides a second lookup function? Or does such a structure (or a similar one) already exist?</p>