commit | 1ecfb73c269f1475d4b2738ef76c20eaecbaa7e9 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Sun Feb 02 16:07:53 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Sun Feb 02 16:07:53 2003 +0000 |
tree | 3c68f87f9269a3ec647f7998c264e1e7acdc2823 | |
parent | a3a53180c0325e85211154ae600240cb3519bada [diff] [blame] |
One more use of ifilter()
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 @@ """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):