From: Antoine Pitrou Date: Sun, 4 Mar 2012 19:20:34 +0000 (+0100) Subject: Port 2.7 fix for sporadic failure in test_weakset. X-Git-Tag: v3.3.0a2~274^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de89d4b09758a1c94dd97be554c967d52759228a;p=thirdparty%2FPython%2Fcpython.git Port 2.7 fix for sporadic failure in test_weakset. --- diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index f34aa864bc2a..c2717e722814 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -114,11 +114,8 @@ class WeakSet: 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)