From: Tim Peters <tim.peters@gmail.com>
Date: Sun, 25 Aug 2002 19:50:43 +0000 (+0000)
Subject: Gave __sub__/difference a factor of 2-5 speed boost.
X-Git-Tag: v2.3c1~4287
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8940393e9be5be09920f28bfea0049e4255354b;p=python

Gave __sub__/difference a factor of 2-5 speed boost.
---

diff --git a/Lib/sets.py b/Lib/sets.py
index bf3ff4df5e..466537387a 100644
--- a/Lib/sets.py
+++ b/Lib/sets.py
@@ -223,9 +223,10 @@ class BaseSet(object):
             return NotImplemented
         result = self.__class__()
         data = result._data
+        otherdata = other._data
         value = True
         for elt in self:
-            if elt not in other:
+            if elt not in otherdata:
                 data[elt] = value
         return result