diff options
Diffstat (limited to 'Lib/plat-mac/gensuitemodule.py')
-rw-r--r-- | Lib/plat-mac/gensuitemodule.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py index 03d38f6..983e0f9 100644 --- a/Lib/plat-mac/gensuitemodule.py +++ b/Lib/plat-mac/gensuitemodule.py @@ -589,7 +589,7 @@ class SuiteCompiler: self.modname = os.path.splitext(os.path.split(self.pathname)[1])[0] - if self.basepackage and self.basepackage._code_to_module.has_key(code): + if self.basepackage and code in self.basepackage._code_to_module: # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module basemodule = self.basepackage._code_to_module[code] @@ -656,12 +656,12 @@ class SuiteCompiler: fp.write('import aetools\n') fp.write('import MacOS\n\n') fp.write("_code = %r\n\n"% (code,)) - if self.basepackage and self.basepackage._code_to_module.has_key(code): + if self.basepackage and code in self.basepackage._code_to_module: # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module fp.write('from %s import *\n'%self.basepackage._code_to_fullname[code][0]) basemodule = self.basepackage._code_to_module[code] - elif self.basepackage and self.basepackage._code_to_module.has_key(code.lower()): + elif self.basepackage and code.lower() in self.basepackage._code_to_module: # This is needed by CodeWarrior and some others. fp.write('from %s import *\n'%self.basepackage._code_to_fullname[code.lower()][0]) basemodule = self.basepackage._code_to_module[code.lower()] @@ -798,7 +798,7 @@ class SuiteCompiler: # # Decode result # - fp.write(" if _arguments.has_key('----'):\n") + fp.write(" if '----' in _arguments:\n") if is_enum(returns): fp.write(" # XXXX Should do enum remapping here...\n") fp.write(" return _arguments['----']\n") @@ -842,17 +842,17 @@ class CodeNameMapper: def addnamecode(self, type, name, code): self.name2code[type][name] = code - if not self.code2name[type].has_key(code): + if code not in self.code2name[type]: self.code2name[type][code] = name def hasname(self, name): for dict in self.name2code.values(): - if dict.has_key(name): + if name in dict: return True return False def hascode(self, type, code): - return self.code2name[type].has_key(code) + return code in self.code2name[type] def findcodename(self, type, code): if not self.hascode(type, code): |