summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-03-04 19:55:35 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-03-04 19:55:35 (GMT)
commita14bd00542d2919af835ac89326c8d634b29b3f3 (patch)
treeca3b4c565922acba3929d3c3f3a2587c962b9253 /Lib
parent8d3c290de4de275fc725b116050ea9d109af1ba8 (diff)
parentde89d4b09758a1c94dd97be554c967d52759228a (diff)
downloadcpython-a14bd00542d2919af835ac89326c8d634b29b3f3.zip
cpython-a14bd00542d2919af835ac89326c8d634b29b3f3.tar.gz
cpython-a14bd00542d2919af835ac89326c8d634b29b3f3.tar.bz2
Port 2.7 fix for sporadic failure in test_weakset.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_weakrefset.py7
1 files changed, 2 insertions, 5 deletions
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 @@ 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)