diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-03-04 19:20:34 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-03-04 19:20:34 (GMT) |
commit | 859416e980dd6b4b96ad066e723709928c5afa81 (patch) | |
tree | 73fff0f2dc51fb418a235f7c89d642700e259db0 /Lib | |
parent | 1cb2e04238fa09094ce02d26833a19d2bd70d81d (diff) | |
download | cpython-859416e980dd6b4b96ad066e723709928c5afa81.zip cpython-859416e980dd6b4b96ad066e723709928c5afa81.tar.gz cpython-859416e980dd6b4b96ad066e723709928c5afa81.tar.bz2 |
Fix sporadic failure in test_weakset
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/_weakrefset.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 91077c5..b8d8043 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -116,11 +116,8 @@ class WeakSet(object): def update(self, other): if self._pending_removals: self._commit_removals() - if isinstance(other, self.__class__): - self.data.update(other.data) - else: - for element in other: - self.add(element) + for element in other: + self.add(element) def __ior__(self, other): self.update(other) |