diff MoinMoin/action/Despam.py @ 551:17ab8fe4a94b

refactored some d.has_key(k) to k in d (faster) imported from: moin--main--1.5--patch-555
author Thomas Waldmann <tw@waldmann-edv.de>
date Tue, 11 Apr 2006 09:59:11 +0000
parents 45924beef130
children 3b08d9413589
line wrap: on
line diff
--- a/MoinMoin/action/Despam.py	Tue Apr 11 09:38:38 2006 +0000
+++ b/MoinMoin/action/Despam.py	Tue Apr 11 09:59:11 2006 +0000
@@ -32,7 +32,7 @@
             continue
         
         editor = line.getEditor(request)
-        if not pages.has_key(line.pagename):
+        if not line.pagename in pages:
             pages[line.pagename] = 1
             editors[editor] = editors.get(editor, 0) + 1
             
@@ -75,7 +75,7 @@
         if not request.user.may.read(line.pagename):
             continue
 
-        if not pages.has_key(line.pagename):
+        if not line.pagename in pages:
             pages[line.pagename] = 1
             if line.getEditor(request) == editor:
                 line.time_tuple = request.user.getTime(wikiutil.version2timestamp(line.ed_time_usecs))
@@ -142,7 +142,7 @@
         if not request.user.may.read(line.pagename):
             continue
 
-        if not pages.has_key(line.pagename):
+        if not line.pagename in pages:
             pages[line.pagename] = 1
             if line.getEditor(request) == editor:
                 revertpages.append(line.pagename)