Revision: 6618 Author: cosoleto Date: 2009-04-17 21:02:01 +0000 (Fri, 17 Apr 2009)
Log Message: ----------- Simplified Site.__cmp__(). It becomes 70% faster on Barton and Python 2.5.2 according to cProfile.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-04-17 19:00:08 UTC (rev 6617) +++ trunk/pywikipedia/wikipedia.py 2009-04-17 21:02:01 UTC (rev 6618) @@ -6112,7 +6112,7 @@ """Perform equality and inequality tests on Site objects.""" if not isinstance(other, Site): return 1 - if self.family == other.family: + if self.family.name == other.family.name: return cmp(self.lang ,other.lang) return cmp(self.family.name, other.family.name)
pywikipedia-l@lists.wikimedia.org