diff MoinMoin/config/multiconfig.py @ 1868:64507f46beb2

reduce usage of has_key()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 Mar 2007 22:01:07 +0100
parents 06ce4843b9b5
children bb2e053067fb
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sat Mar 10 20:54:09 2007 +0100
+++ b/MoinMoin/config/multiconfig.py	Sat Mar 10 22:01:07 2007 +0100
@@ -677,7 +677,7 @@
         """
         unknown = ['"%s"' % name for name in dir(self)
                   if not name.startswith('_') and
-                  not DefaultConfig.__dict__.has_key(name) and
+                  name not in DefaultConfig.__dict__ and
                   not isinstance(getattr(self, name), (type(sys), type(DefaultConfig)))]
         if unknown:
             msg = """
@@ -822,7 +822,7 @@
         """
         # user checkbox defaults
         for key, value in DefaultConfig.user_checkbox_defaults.items():
-            if not self.user_checkbox_defaults.has_key(key):
+            if key not in self.user_checkbox_defaults:
                 self.user_checkbox_defaults[key] = value
 
     def __getitem__(self, item):