]> granicus.if.org Git - python/commitdiff
Sped union by a factor of 3-4.
authorTim Peters <tim.peters@gmail.com>
Sun, 25 Aug 2002 19:21:27 +0000 (19:21 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 25 Aug 2002 19:21:27 +0000 (19:21 +0000)
Lib/sets.py

index e88e845c1fd35f443896a246597628841dd57cd5..10138fca5e1a418902f0b51a30f4565e04144de8 100644 (file)
@@ -154,7 +154,8 @@ class BaseSet(object):
         """
         if not isinstance(other, BaseSet):
             return NotImplemented
-        result = self.__class__(self._data)
+        result = self.__class__()
+        result._data = self._data.copy()
         result._data.update(other._data)
         return result