http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10192
Revision: 10192 Author: xqt Date: 2012-05-06 06:22:31 +0000 (Sun, 06 May 2012) Log Message: ----------- use xrange iterator instead of range list in for statements
Modified Paths: -------------- branches/rewrite/scripts/interwiki.py
Modified: branches/rewrite/scripts/interwiki.py =================================================================== --- branches/rewrite/scripts/interwiki.py 2012-05-06 06:21:27 UTC (rev 10191) +++ branches/rewrite/scripts/interwiki.py 2012-05-06 06:22:31 UTC (rev 10192) @@ -2091,7 +2091,7 @@ % fs.originPage) pywikibot.output(u"NOTE: Number of pages queued is %d, trying to add %d more." % (len(self.subjects), number)) - for i in range(number): + for i in xrange(number): try: while True: try: @@ -2248,7 +2248,7 @@ def queryStep(self): self.oneQuery() # Delete the ones that are done now. - for i in range(len(self.subjects)-1, -1, -1): + for i in xrange(len(self.subjects)-1, -1, -1): subj = self.subjects[i] if subj.isDone(): subj.finish(self)