summaryrefslogtreecommitdiffstats
path: root/Lib/_collections_abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r--Lib/_collections_abc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 005d884..e89e84b 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -589,7 +589,7 @@ class MutableSet(Set):
try:
value = next(it)
except StopIteration:
- raise KeyError
+ raise KeyError from None
self.discard(value)
return value
@@ -808,7 +808,7 @@ class MutableMapping(Mapping):
try:
key = next(iter(self))
except StopIteration:
- raise KeyError
+ raise KeyError from None
value = self[key]
del self[key]
return key, value