http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9493
Revision: 9493 Author: xqt Date: 2011-09-03 11:17:47 +0000 (Sat, 03 Sep 2011) Log Message: ----------- actualize doc; strip() default char.
Modified Paths: -------------- branches/rewrite/pywikibot/page.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2011-09-03 11:04:34 UTC (rev 9492) +++ branches/rewrite/pywikibot/page.py 2011-09-03 11:17:47 UTC (rev 9493) @@ -2213,10 +2213,10 @@
# Replace underscores by spaces t = t.replace(u"_", u" ") - # replace multiple spaces and underscores with a single space + # replace multiple spaces with a single space while u" " in t: t = t.replace(u" ", u" ") # Strip spaces at both ends - t = t.strip(" ") + t = t.strip() # Remove left-to-right and right-to-left markers. t = t.replace(u"\u200e", u"").replace(u"\u200f", u"") self._text = t
pywikipedia-svn@lists.wikimedia.org