Commit de89d4b0 authored by Antoine Pitrou's avatar Antoine Pitrou

Port 2.7 fix for sporadic failure in test_weakset.

parent 4a90ef03
...@@ -114,11 +114,8 @@ class WeakSet: ...@@ -114,11 +114,8 @@ class WeakSet:
def update(self, other): def update(self, other):
if self._pending_removals: if self._pending_removals:
self._commit_removals() self._commit_removals()
if isinstance(other, self.__class__): for element in other:
self.data.update(other.data) self.add(element)
else:
for element in other:
self.add(element)
def __ior__(self, other): def __ior__(self, other):
self.update(other) self.update(other)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment