Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Last active May 5, 2020 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmic-cortex/70205f6dc95671981f52e127aad6cb12 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/70205f6dc95671981f52e127aad6cb12 to your computer and use it in GitHub Desktop.
class Record(dict):
def __hash__(self):
proxy = tuple(self.items())
return hash(proxy)
def __setitem__(self, key, value):
raise NotImplemented("Modifying values is not supported.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment