Revision: 6725 Author: nicdumz Date: 2009-04-26 08:31:00 +0000 (Sun, 26 Apr 2009)
Log Message: ----------- Don't construct keys() when it's not needed
Modified Paths: -------------- trunk/pywikipedia/family.py
Modified: trunk/pywikipedia/family.py =================================================================== --- trunk/pywikipedia/family.py 2009-04-26 04:13:27 UTC (rev 6724) +++ trunk/pywikipedia/family.py 2009-04-26 08:31:00 UTC (rev 6725) @@ -3377,7 +3377,7 @@ def pagenamecodes(self,code): pos = ['PAGENAME'] pos2 = [] - if code in self.pagename.keys(): + if code in self.pagename: pos = pos + self.pagename[code] elif code == 'als': return self.pagenamecodes('de') @@ -3390,7 +3390,7 @@ def pagename2codes(self,code): pos = ['PAGENAME'] pos2 = [] - if code in self.pagenamee.keys(): + if code in self.pagenamee: pos = pos + self.pagenamee[code] elif code == 'als': return self.pagename2codes('de')
pywikipedia-svn@lists.wikimedia.org