Revision: 6437 Author: russblau Date: 2009-02-24 20:40:40 +0000 (Tue, 24 Feb 2009)
Log Message: ----------- fix randompages() typos
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-02-24 16:41:11 UTC (rev 6436) +++ trunk/pywikipedia/wikipedia.py 2009-02-24 20:40:40 UTC (rev 6437) @@ -5397,8 +5397,8 @@ if not repeat: break
- def randompages(self, number=1, repeat=False, randmoredirect=False): - """Yield irandom pages via Special:Random, or Special:RandmRedirect.""" + def randompages(self, number=1, repeat=False, randomredirect=False): + """Yield random pages via Special:Random, or Special:RandomRedirect.""" seen = set() if randomredirect: path = self.randomredirect_address() @@ -5417,7 +5417,8 @@ # output(u' title=%s' % ( title )) if title not in seen: seen.add(title) - page = Page(self, title) + yield Page(self, title) +
def randomredirectpages(self, number=1, repeat=False, randmoredirect=True): """Yield irandom pages via Special:Random, or Special:RandmRedirect."""