Revision: 4059 Author: btongminh Date: 2007-08-17 13:41:50 +0000 (Fri, 17 Aug 2007)
Log Message: ----------- Make Family objects hashable
Modified Paths: -------------- trunk/pywikipedia/family.py
Modified: trunk/pywikipedia/family.py =================================================================== --- trunk/pywikipedia/family.py 2007-08-17 13:19:18 UTC (rev 4058) +++ trunk/pywikipedia/family.py 2007-08-17 13:41:50 UTC (rev 4059) @@ -2614,6 +2614,8 @@ return cmp(self.name, otherfamily.name) except AttributeError: return cmp(id(self), id(otherfamily)) + def __hash__(self): + return hash(self.name)
def RversionTab(self, code): """Change this to some regular expression that shows the page we