summaryrefslogtreecommitdiffstats
path: root/Lib/ihooks.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-06-01 14:18:47 (GMT)
commit54f0222547b1e92cd018ef132307a6f793dc9505 (patch)
tree667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/ihooks.py
parent9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff)
downloadcpython-54f0222547b1e92cd018ef132307a6f793dc9505.zip
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz
cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.bz2
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/ihooks.py')
-rw-r--r--Lib/ihooks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/ihooks.py b/Lib/ihooks.py
index cf02538..7b00837 100644
--- a/Lib/ihooks.py
+++ b/Lib/ihooks.py
@@ -175,7 +175,7 @@ class Hooks(_Verbose):
def add_module(self, name):
d = self.modules_dict()
- if d.has_key(name): return d[name]
+ if name in d: return d[name]
d[name] = m = self.new_module(name)
return m
@@ -352,7 +352,7 @@ class BasicModuleImporter(_Verbose):
return self.loader.set_hooks(hooks)
def import_module(self, name, globals={}, locals={}, fromlist=[]):
- if self.modules.has_key(name):
+ if name in self.modules:
return self.modules[name] # Fast path
stuff = self.loader.find_module(name)
if not stuff:
@@ -403,10 +403,10 @@ class ModuleImporter(BasicModuleImporter):
return m
def determine_parent(self, globals):
- if not globals or not globals.has_key("__name__"):
+ if not globals or not "__name__" in globals:
return None
pname = globals['__name__']
- if globals.has_key("__path__"):
+ if "__path__" in globals:
parent = self.modules[pname]
assert globals is parent.__dict__
return parent