Revision: 4553 Author: rotem Date: 2007-11-15 11:22:04 +0000 (Thu, 15 Nov 2007)
Log Message: ----------- Addition to PrefixingPageGenerator: Parameter includeredirects, as in AllpagesPageGenerator.
Modified Paths: -------------- trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py =================================================================== --- trunk/pywikipedia/pagegenerators.py 2007-11-15 11:15:30 UTC (rev 4552) +++ trunk/pywikipedia/pagegenerators.py 2007-11-15 11:22:04 UTC (rev 4553) @@ -121,8 +121,8 @@ for page in wikipedia.getSite().allpages(start=title, namespace=namespace, includeredirects = includeredirects): yield page
-def PrefixingPageGenerator(prefix, namespace=None): - for page in AllpagesPageGenerator(prefix, namespace): +def PrefixingPageGenerator(prefix, namespace=None, includeredirects=True): + for page in AllpagesPageGenerator(prefix, namespace, includeredirects): if page.titleWithoutNamespace().startswith(prefix): yield page else: