commit | de89d4b09758a1c94dd97be554c967d52759228a | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 04 20:20:34 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 04 20:20:34 2012 +0100 |
tree | af59ad4840f810d7d48186eafd72ec2e0c89c657 | |
parent | 4a90ef03637fdc1bc63ee9be82fbf22cbaa68662 [diff] [blame] |
Port 2.7 fix for sporadic failure in test_weakset.
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index f34aa86..c2717e7 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py
@@ -114,11 +114,8 @@ 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)