summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-02-10 00:43:22 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-02-10 00:43:22 (GMT)
commit69926eaee050674b12c55ca6f476f1d1dc5b7db3 (patch)
tree6d551f5bfa0564a55be6e8a0e9b50cce3e8e4824
parente8c6ce4684eaae101d9053abdc9df8df828e92a7 (diff)
downloadcpython-69926eaee050674b12c55ca6f476f1d1dc5b7db3.zip
cpython-69926eaee050674b12c55ca6f476f1d1dc5b7db3.tar.gz
cpython-69926eaee050674b12c55ca6f476f1d1dc5b7db3.tar.bz2
add remove method to set
-rw-r--r--Lib/compiler/misc.py2
-rw-r--r--Tools/compiler/compiler/misc.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/compiler/misc.py b/Lib/compiler/misc.py
index 5a3e261..0dc6422 100644
--- a/Lib/compiler/misc.py
+++ b/Lib/compiler/misc.py
@@ -7,6 +7,8 @@ class Set:
return self.elts.keys()
def has_elt(self, elt):
return self.elts.has_key(elt)
+ def remove(self, elt):
+ del self.elts[elt]
class Stack:
def __init__(self):
diff --git a/Tools/compiler/compiler/misc.py b/Tools/compiler/compiler/misc.py
index 5a3e261..0dc6422 100644
--- a/Tools/compiler/compiler/misc.py
+++ b/Tools/compiler/compiler/misc.py
@@ -7,6 +7,8 @@ class Set:
return self.elts.keys()
def has_elt(self, elt):
return self.elts.has_key(elt)
+ def remove(self, elt):
+ del self.elts[elt]
class Stack:
def __init__(self):