http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10851
Revision: 10851 Author: xqt Date: 2012-12-30 16:51:15 +0000 (Sun, 30 Dec 2012) Log Message: ----------- better performance
Modified Paths: -------------- branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py =================================================================== --- branches/rewrite/pywikibot/site.py 2012-12-30 15:20:57 UTC (rev 10850) +++ branches/rewrite/pywikibot/site.py 2012-12-30 16:51:15 UTC (rev 10851) @@ -145,8 +145,10 @@
self.nocapitalize = self.code in self.family.nocapitalize if not self.nocapitalize: - user = None if user is None else user[0].upper() + user[1:] - sysop = None if sysop is None else sysop[0].upper() + sysop[1:] + if user: + user = user[0].upper() + user[1:] + if sysop: + sysop = sysop[0].upper() + sysop[1:] self._username = [user, sysop] self.use_hard_category_redirects = \ self.code in self.family.use_hard_category_redirects
pywikipedia-svn@lists.wikimedia.org