I have some puzzling code I am trying to migrate to Typescript. Look at this:
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
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.