From: Antoine Pitrou Date: Sun, 4 Mar 2012 19:20:34 +0000 (+0100) Subject: Fix sporadic failure in test_weakset X-Git-Tag: v2.7.4rc1~1002 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=859416e980dd6b4b96ad066e723709928c5afa81;p=thirdparty%2FPython%2Fcpython.git Fix sporadic failure in test_weakset --- diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 91077c5b9509..b8d804301acb 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)