summaryrefslogtreecommitdiffstats
path: root/Lib/pyclbr.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/pyclbr.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/pyclbr.py')
-rw-r--r--Lib/pyclbr.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py
index 31fad46..29b8354 100644
--- a/Lib/pyclbr.py
+++ b/Lib/pyclbr.py
@@ -171,7 +171,7 @@ def readmodule_ex(module, path=[], inpackage=0):
child = readmodule_ex(submodule, parent['__path__'], 1)
return child
- if _modules.has_key(module):
+ if module in _modules:
# we've seen this module before...
return _modules[module]
if module in sys.builtin_module_names:
@@ -265,7 +265,7 @@ def readmodule_ex(module, path=[], inpackage=0):
names = []
for n in inherit.split(','):
n = n.strip()
- if dict.has_key(n):
+ if n in dict:
# we know this super class
n = dict[n]
else:
@@ -278,9 +278,9 @@ def readmodule_ex(module, path=[], inpackage=0):
# module for class
m = c[-2]
c = c[-1]
- if _modules.has_key(m):
+ if m in _modules:
d = _modules[m]
- if d.has_key(c):
+ if c in d:
n = d[c]
names.append(n)
inherit = names
@@ -316,7 +316,7 @@ def readmodule_ex(module, path=[], inpackage=0):
# were mentioned in the list
for n in names:
n = n.strip()
- if d.has_key(n):
+ if n in d:
dict[n] = d[n]
elif n == '*':
# only add a name if not
@@ -326,7 +326,7 @@ def readmodule_ex(module, path=[], inpackage=0):
# start with _
for n in d.keys():
if n[0] != '_' and \
- not dict.has_key(n):
+ not n in dict:
dict[n] = d[n]
else:
assert 0, "regexp _getnext found something unexpected"