summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/_abcoll.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/_abcoll.py b/Lib/_abcoll.py
index 3a84b96..e1e6510 100644
--- a/Lib/_abcoll.py
+++ b/Lib/_abcoll.py
@@ -250,6 +250,12 @@ class MutableSet(Set):
"""Return True if it was deleted, False if not there."""
raise NotImplementedError
+ def remove(self, value):
+ """Remove an element. If not a member, raise a KeyError."""
+ if value not in self:
+ raise KeyError(value)
+ self.discard(value)
+
def pop(self):
"""Return the popped value. Raise KeyError if empty."""
it = iter(self)