Created
June 3, 2013 07:17
-
-
Save tetra5/5696552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _hash(entity): | |
try: | |
from hashlib import md5 | |
except ImportError: | |
from md5 import new as md5 | |
return int(md5(repr(entity)).hexdigest(), 16) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment