diff options
Diffstat (limited to 'Lib/sets.py')
-rw-r--r-- | Lib/sets.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/sets.py b/Lib/sets.py index 10138fc..bf3ff4d 100644 --- a/Lib/sets.py +++ b/Lib/sets.py @@ -197,11 +197,13 @@ class BaseSet(object): result = self.__class__() data = result._data value = True - for elt in self: - if elt not in other: + selfdata = self._data + otherdata = other._data + for elt in selfdata: + if elt not in otherdata: data[elt] = value - for elt in other: - if elt not in self: + for elt in otherdata: + if elt not in selfdata: data[elt] = value return result |