add remove method to set

This commit is contained in:
Jeremy Hylton 2000-02-10 00:43:22 +00:00
parent e8c6ce4684
commit 69926eaee0
2 changed files with 4 additions and 0 deletions

View File

@ -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):

View File

@ -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):