Created
May 15, 2016 11:39
-
-
Save roylee0704/ecac45dbe8a4f7494d6a4e7bee73c856 to your computer and use it in GitHub Desktop.
Python prehash implementation of custom type.
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
class CustomType: | |
def __init__(self,name,location,length): | |
self.name = name | |
self.location = location | |
self.length = length | |
def __hash__(self): | |
return hash((self.name, self.location)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment