]> granicus.if.org Git - python/commitdiff
Fix sporadic failure in test_weakset
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 4 Mar 2012 19:20:34 +0000 (20:20 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 4 Mar 2012 19:20:34 +0000 (20:20 +0100)
Lib/_weakrefset.py

index 91077c5b95092b00ab9ea460c344436eb2341ac3..b8d804301acb8be304352f9266b81a183f932068 100644 (file)
@@ -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)