Skip to content

Commit de89d4b

Browse files
committed
Port 2.7 fix for sporadic failure in test_weakset.
1 parent 4a90ef0 commit de89d4b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/_weakrefset.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,8 @@ def discard(self, item):
114114
def update(self, other):
115115
if self._pending_removals:
116116
self._commit_removals()
117-
if isinstance(other, self.__class__):
118-
self.data.update(other.data)
119-
else:
120-
for element in other:
121-
self.add(element)
117+
for element in other:
118+
self.add(element)
122119

123120
def __ior__(self, other):
124121
self.update(other)

0 commit comments

Comments
 (0)