summaryrefslogtreecommitdiffstats
path: root/Lib/sets.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sets.py')
-rw-r--r--Lib/sets.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/sets.py b/Lib/sets.py
index 5a0167d..c167d96 100644
--- a/Lib/sets.py
+++ b/Lib/sets.py
@@ -436,9 +436,8 @@ class Set(BaseSet):
"""Remove all elements of another set from this set."""
self._binary_sanity_check(other)
data = self._data
- for elt in other:
- if elt in data:
- del data[elt]
+ for elt in ifilter(data.has_key, other):
+ del data[elt]
return self
def difference_update(self, other):