One more use of ifilter()
This commit is contained in:
parent
a3a53180c0
commit
1ecfb73c26
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue