Revision: 6694 Author: nicdumz Date: 2009-04-24 06:38:24 +0000 (Fri, 24 Apr 2009)
Log Message: ----------- PageTree internals : dict -> list
PageTree is never used to reference individual pages. Only operations on tree[site] are: * len * add No individual Page lookups? Then tree[site] does not need to be a dict. Using a list instead.
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2009-04-24 06:31:34 UTC (rev 6693) +++ trunk/pywikipedia/interwiki.py 2009-04-24 06:38:24 UTC (rev 6694) @@ -527,8 +527,8 @@ def add(self, page): site = page.site() if not site in self.tree: - self.tree[site] = {} - self.tree[site][page] = True + self.tree[site] = [] + self.tree[site].append(page) self.size += 1
def removeSite(self, site):