Commits

Anonymous committed 2843f32 Merge

Port 2.7 fix for sporadic failure in test_weakset.

Comments (0)

Files changed (1)

Lib/_weakrefset.py

     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)