http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11583
Revision: 11583 Author: valhallasw Date: 2013-05-25 14:24:07 +0000 (Sat, 25 May 2013) Log Message: ----------- Add repr() to pywikibot.Link objects
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-05-25 14:23:14 UTC (rev 11582) +++ branches/rewrite/pywikibot/page.py 2013-05-25 14:24:07 UTC (rev 11583) @@ -2824,6 +2824,9 @@ t = t.replace(u"\u200e", u"").replace(u"\u200f", u"") self._text = t
+ def __repr__(self): + return "pywikibot.page.Link(%r, %r)" % (self.title, self.site) + def parse_site(self): """Parse only enough text to determine which site the link points to.