http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9177
Revision: 9177 Author: xqt Date: 2011-04-15 10:43:40 +0000 (Fri, 15 Apr 2011) Log Message: ----------- trailing whitespaces removed
Modified Paths: -------------- trunk/pywikipedia/catlib.py
Modified: trunk/pywikipedia/catlib.py =================================================================== --- trunk/pywikipedia/catlib.py 2011-04-15 10:22:58 UTC (rev 9176) +++ trunk/pywikipedia/catlib.py 2011-04-15 10:43:40 UTC (rev 9177) @@ -97,7 +97,7 @@ else: return '[[%s]]' % titleWithSortKey
- def _getAndCacheContents(self, recurse=False, purge=False, startFrom=None, cache=None, + def _getAndCacheContents(self, recurse=False, purge=False, startFrom=None, cache=None, sortby=None, sortdir=None): """ Cache results of _parseCategory for a second call. @@ -164,11 +164,11 @@ Simple category content yielder. Naive, do not attempts to cache anything """ - for tag, page in self._parseCategory(startFrom=startFrom, + for tag, page in self._parseCategory(startFrom=startFrom, sortby=sortby, sortdir=sortdir): yield tag, page if tag == SUBCATEGORY and recurse: - for item in page._getContentsNaive(recurse=True, + for item in page._getContentsNaive(recurse=True, sortby=sortby, sortdir=sortdir): yield item