http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10965
Revision: 10965 Author: xqt Date: 2013-01-21 09:12:28 +0000 (Mon, 21 Jan 2013) Log Message: ----------- DataPage.interwiki() must return a list of Page objects, not a tuple; DataPage.isEmpty() should be always False if the page exists.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-01-20 23:37:40 UTC (rev 10964) +++ trunk/pywikipedia/wikipedia.py 2013-01-21 09:12:28 UTC (rev 10965) @@ -4406,6 +4406,9 @@ self._contents = json.loads(pagetext) return self._contents
+ def isEmpty(self): + return not self.exists() + def interwiki(self): """Return a list of interwiki links from data repository.
@@ -4414,7 +4417,7 @@
""" links = self.get()['links'] - self._interwiki = [(code.replace('wiki', ''), links[code]) + self._interwiki = [Page(code.replace('wiki', ''), links[code]) for code in links] return self._interwiki
pywikipedia-svn@lists.wikimedia.org