summaryrefslogtreecommitdiff
path: root/Lib/compiler/misc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-15 08:58:59 +0000
committerGeorg Brandl <georg@python.org>2008-12-15 08:58:59 +0000
commit2d2fe572a4605d3c25055717c1033589e2889e65 (patch)
treec5d67af0ba51c48f36bf7117539f26ea04b496fe /Lib/compiler/misc.py
parentcbc1ed5e2811d2ef7dbf243a1adbcf1c9bf6cba1 (diff)
downloadcpython-git-2d2fe572a4605d3c25055717c1033589e2889e65.tar.gz
#4578: fix has_key() usage in compiler package.
Diffstat (limited to 'Lib/compiler/misc.py')
-rw-r--r--Lib/compiler/misc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compiler/misc.py b/Lib/compiler/misc.py
index 8d91770927..588c7fbd5a 100644
--- a/Lib/compiler/misc.py
+++ b/Lib/compiler/misc.py
@@ -14,13 +14,13 @@ class Set:
def __len__(self):
return len(self.elts)
def __contains__(self, elt):
- return self.elts.has_key(elt)
+ return elt in self.elts
def add(self, elt):
self.elts[elt] = elt
def elements(self):
return self.elts.keys()
def has_elt(self, elt):
- return self.elts.has_key(elt)
+ return elt in self.elts
def remove(self, elt):
del self.elts[elt]
def copy(self):