Skip to content

Instantly share code, notes, and snippets.

@sloria
Created June 30, 2013 16:09
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 sloria/5895766 to your computer and use it in GitHub Desktop.
Save sloria/5895766 to your computer and use it in GitHub Desktop.
class Book:
...
def __hash__(self):
return hash(self.author) ^ hash(self.other)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment