From 69926eaee050674b12c55ca6f476f1d1dc5b7db3 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 10 Feb 2000 00:43:22 +0000 Subject: [PATCH] add remove method to set --- Lib/compiler/misc.py | 2 ++ Tools/compiler/compiler/misc.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Lib/compiler/misc.py b/Lib/compiler/misc.py index 5a3e261d646..0dc64226034 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 5a3e261d646..0dc64226034 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):