diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-08-25 19:21:27 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-08-25 19:21:27 +0000 |
commit | b49f430fa7a5f5d2f0ca4ac93614a29f92738c20 (patch) | |
tree | 105a29c069b665d3b90524e26165dda4a8b318fe /Lib/sets.py | |
parent | 0ef6feb8c104ad600e1d1722763602b1efa735f1 (diff) | |
download | cpython-b49f430fa7a5f5d2f0ca4ac93614a29f92738c20.tar.gz |
Sped union by a factor of 3-4.
Diffstat (limited to 'Lib/sets.py')
-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 e88e845c1f..10138fca5e 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 |