diff options
author | Raymond Hettinger <python@rcn.com> | 2003-02-02 16:07:53 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-02-02 16:07:53 (GMT) |
commit | 1ecfb73c269f1475d4b2738ef76c20eaecbaa7e9 (patch) | |
tree | 3c68f87f9269a3ec647f7998c264e1e7acdc2823 /Lib/sets.py | |
parent | a3a53180c0325e85211154ae600240cb3519bada (diff) | |
download | cpython-1ecfb73c269f1475d4b2738ef76c20eaecbaa7e9.zip cpython-1ecfb73c269f1475d4b2738ef76c20eaecbaa7e9.tar.gz cpython-1ecfb73c269f1475d4b2738ef76c20eaecbaa7e9.tar.bz2 |
One more use of ifilter()
Diffstat (limited to 'Lib/sets.py')
-rw-r--r-- | Lib/sets.py | 5 |
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): |