diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-08-25 19:21:27 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-08-25 19:21:27 (GMT) |
commit | 37faed2532b3baf3b24cd4839aa5f5242b0c807d (patch) | |
tree | f203c5cb70ca90256e7edd62c5d61e7715f952a8 | |
parent | d33e6be59df8cd8ba701d744ffc2fc7e2d483daa (diff) | |
download | cpython-37faed2532b3baf3b24cd4839aa5f5242b0c807d.zip cpython-37faed2532b3baf3b24cd4839aa5f5242b0c807d.tar.gz cpython-37faed2532b3baf3b24cd4839aa5f5242b0c807d.tar.bz2 |
Sped union by a factor of 3-4.
-rw-r--r-- | Lib/sets.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sets.py b/Lib/sets.py index e88e845..10138fc 100644 --- a/Lib/sets.py +++ b/Lib/sets.py @@ -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 |