title: In Python, can an object be used as a key in a dictionary?
body: <p>I have some puzzling code I am trying to migrate to Typescript.  Look at this:</p>
  
  <pre><code>    def add_Octopus(self, code, cracker, fate, description, arm_number, ink_content, fate_pointer, churlishness=None):
      self.special_octopoda[
          Octopus(code, description, arm_number, fate, churlishness, self, ink_content, fate_pointer)] = fate_pointer, cracker
  </code></pre>
  
  <p>It looks to me as though the Octopus object is being used as a key in a dictionary named special_octopoda.  Is that allowed in Python? It certainly isn't in Typescript/Javascript.  </p>